Module Expr Str Import alias Import alias Import alias ImportFrom alias alias alias FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Num keyword NameLoad If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr keyword NameLoad orelse Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr GeneratorExp BinOpAdd BinOpAdd SubscriptLoad NameLoad Slice Num Num TupleLoad NameLoad SubscriptLoad NameLoad Slice Num comprehension NameStore NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str If UnaryOpNot NameLoad body Print Str Return If NameLoad body Assign NameStore ListComp NameLoad comprehension NameStore NameLoad CompareNotIn SubscriptLoad NameLoad Index Num NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore Str If NameLoad body Assign NameStore BinOpAdd Str NameLoad If CompareEq NameLoad Str body AugAssignAdd NameStore Str For NameStore SubscriptLoad NameLoad Slice NameLoad body Assign NameStore Call NameLoad BinOpAdd Call NameLoad Call NameLoad SubscriptLoad NameLoad Slice Num Call NameLoad SubscriptLoad NameLoad Slice Num If UnaryOpNot NameLoad body Assign NameStore SubscriptLoad NameLoad Slice Num Print BinOpMod NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str If NameLoad body Print BinOpMod Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Print Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Print Call AttributeLoad NameLoad attr Print Call AttributeLoad NameLoad attr Print Call AttributeLoad NameLoad attr Print Call AttributeLoad NameLoad attr keyword Str Print decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str If NameLoad body Print BinOpMod Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Print Call AttributeLoad NameLoad attr Print decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults vararg body Expr Str For NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword TupleLoad Str Str Str Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword NameLoad keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Num keyword Str Assign NameStore Call AttributeLoad NameLoad attr If CompareIn AttributeLoad NameLoad attr ListLoad Str Str body Assign NameStore ListLoad If AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Call NameLoad AttributeLoad NameLoad attr orelse If CompareEq AttributeLoad NameLoad attr Str body If AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad orelse Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse If CompareEq AttributeLoad NameLoad attr Str body If AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad orelse Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Assert Num BinOpMod Str AttributeLoad NameLoad attr decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A Provides the command-line utility `fontdiff`.

Leverages various DiffFinder classes, depending on what's given via the
`diff_type` argument. Can compare multiple font pairs via the `match` argument.
For shaping comparisons, all results are sorted together and the largest
differences from all pairs are shown first. For GPOS the pairs are still
compared separately.
 N/A argparse N/A glob N/A os nototools gpos_diff gsub_diff shape_diff _shape N/A N/A path_a path_b stats diff_type render_path N/A N/A N/A Do a shape comparison (glyph area or rendered) and add results to stats.

    path_a and b refer to binary font files (OTF or TTF). stats should be a
    list (possibly empty) of <diff, glyph-name, font-name> tuples, for sorting.
    diff_type and render_path are passed through from the original call to
    fontdiff.
     N/A cur_stats N/A N/A diff_finder N/A N/A shape_diff ShapeDiffFinder path_a path_b output_lines -1 ratio_diffs True N/A N/A diff_type area N/A N/A N/A N/A diff_finder find_area_diffs stats cur_stats N/A N/A N/A N/A diff_finder find_rendered_diffs stats cur_stats render_path render_path N/A basename N/A N/A N/A os path basename path_a N/A N/A N/A stats extend N/A N/A N/A N/A s N/A 0 2 N/A basename N/A s N/A 2 N/A s cur_stats N/A _dump_shape_stats N/A N/A stats whitelist out_lines diff_type multiple_fonts N/A N/A N/A Dump stats accumulated from calls to _shape.

    Members of stats are passed in with sortable ordering, but are re-ordered
    for printing. whitelist, out_lines, and diff_type are passed through from
    the original call to fontdiff. multiple_fonts designates whether these stats
    have been accumulated from multiple calls or just one; if multiple then the
    font names from each stats member will be printed as well.
     N/A N/A stats N/A N/A No differences found. N/A N/A whitelist N/A N/A stats N/A s N/A s stats N/A N/A s N/A 1 whitelist N/A N/A N/A stats sort N/A N/A N/A stats reverse N/A stat_format %s %s N/A multiple_fonts N/A N/A stat_format N/A %s  stat_format N/A N/A diff_type area N/A N/A stat_format  (%s vs %s) N/A stat N/A stats N/A out_lines N/A N/A stat N/A tuple N/A N/A list N/A reversed N/A stat N/A 3 N/A list N/A stat N/A 3 N/A N/A multiple_fonts N/A N/A stat N/A stat N/A 1 N/A N/A stat_format stat N/A _gpos N/A N/A path_a path_b error_bound out_lines print_font N/A False N/A N/A Do a GPOS table comparison and print results.

    path_a and b refer to plaintext files containing ttxn output. print_font
    is a boolean flag designating whether to print path_a (useful if _gpos is
    being called multiple times in succession).
     N/A print_font N/A N/A N/A -- %s -- N/A N/A N/A os path basename path_a N/A N/A diff_finder N/A N/A gpos_diff GposDiffFinder path_a path_b error_bound out_lines N/A N/A N/A diff_finder find_kerning_diffs N/A N/A N/A diff_finder find_mark_class_diffs N/A N/A N/A diff_finder find_positioning_diffs N/A N/A N/A diff_finder find_positioning_diffs mark_type mark N/A N/A _gsub N/A N/A path_a path_b out_lines print_font N/A False N/A N/A Do a GSUB table comparison and print results.

    path_a and b refer to plaintext files containing ttxn output. print_font
    is a boolean flag designating whether to print path_a (useful if _gsub is
    being called multiple times in succession).
     N/A print_font N/A N/A N/A -- %s -- N/A N/A N/A os path basename path_a N/A diff_finder N/A N/A gsub_diff GsubDiffFinder path_a path_b out_lines N/A N/A N/A diff_finder find_gsub_diffs N/A N/A _run_multiple N/A N/A func filematch dir_a dir_b N/A args N/A N/A Run a comparison function (probably _shape or _gpos) multiple times.

    Runs the given function "func" for each file in dir_a matching filematch,
    comparing it with a respective file of the same name in dir_b. Variable
    arguments are passed through when calling func.
     N/A path_a N/A N/A glob glob N/A N/A N/A os path join dir_a filematch N/A N/A path_b N/A N/A path_a replace dir_a dir_b N/A N/A func path_a path_b args N/A main N/A N/A N/A N/A N/A parser N/A N/A argparse ArgumentParser description Compare fonts or ttxn output pointed to by PATH_A and PATH_B. N/A N/A N/A parser add_argument path_a metavar PATH_A N/A N/A N/A parser add_argument path_b metavar PATH_B N/A N/A N/A parser add_argument -t --diff-type default area choices N/A area rendered gpos gsub help type of comparison to run (defaults to "area"), if "gpos" is provided the input paths should point to ttxn output N/A N/A N/A parser add_argument -m --match help if provided, compares all matching files found in PATH_A with respective matches in PATH_B N/A N/A N/A parser add_argument -l --out-lines type int default 20 help number of differences to print (default 20) N/A N/A N/A parser add_argument -w --whitelist nargs + help list of one or more glyph names to ignore N/A N/A N/A parser add_argument --render-path help if provided and DIFF_TYPE is "rendered", saves comparison renderings here N/A N/A N/A parser add_argument --gpos-bound type int default 3 help error bound to allow for gpos differences, anything below is not printed (default 3) N/A args N/A N/A parser parse_args N/A N/A N/A args diff_type N/A area rendered N/A N/A stats N/A N/A N/A args match N/A N/A N/A _run_multiple _shape N/A args match N/A args path_a N/A args path_b stats N/A args diff_type N/A args render_path N/A N/A N/A _shape N/A args path_a N/A args path_b stats N/A args diff_type N/A args render_path N/A N/A _dump_shape_stats stats N/A args whitelist N/A args out_lines N/A args diff_type multiple_fonts N/A bool N/A args match N/A N/A N/A N/A args diff_type gpos N/A N/A N/A args match N/A N/A N/A _run_multiple _gpos N/A args match N/A args path_a N/A args path_b N/A args gpos_bound N/A args out_lines True N/A N/A N/A _gpos N/A args path_a N/A args path_b N/A args gpos_bound N/A args out_lines N/A N/A N/A N/A args diff_type gsub N/A N/A N/A args match N/A N/A N/A _run_multiple _gsub N/A args match N/A args path_a N/A args path_b N/A args out_lines True N/A N/A N/A _gsub N/A args path_a N/A args path_b N/A args out_lines N/A N/A 0 N/A Got unhandled diff type "%s" N/A args diff_type N/A N/A N/A __name__ __main__ N/A N/A N/A main