Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ttx_diff] Remove unused argument #1053

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions resources/scripts/ttx_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,7 @@ def stat_like_fontmake(ttx):
ver.attrib["value"] = "0x00010001"


def allow_some_off_by_ones(
build_dir, fontc, fontmake, container, name_attr, coord_holder
):
def allow_some_off_by_ones(fontc, fontmake, container, name_attr, coord_holder):
fontmake_num_coords = len(fontmake.xpath(f"//{container}/{coord_holder}"))
off_by_one_budget = int(FLAGS.off_by_one_budget / 100.0 * fontmake_num_coords)
spent = 0
Expand Down Expand Up @@ -432,7 +430,7 @@ def remove_mark_and_kern_lookups(ttx):
lookup_type_el.attrib["value"] = str(lookup_type)


def reduce_diff_noise(build_dir, fontc, fontmake):
def reduce_diff_noise(fontc: etree.ElementTree, fontmake: etree.ElementTree):
sort_fontmake_feature_lookups(fontmake)
for ttx in (fontc, fontmake):
# different name ids with the same value is fine
Expand All @@ -453,10 +451,10 @@ def reduce_diff_noise(build_dir, fontc, fontmake):
remove_mark_and_kern_lookups(ttx)

allow_some_off_by_ones(
build_dir, fontc, fontmake, "glyf/TTGlyph", "name", "/contour/pt"
fontc, fontmake, "glyf/TTGlyph", "name", "/contour/pt"
)
allow_some_off_by_ones(
build_dir, fontc, fontmake, "gvar/glyphVariations", "glyph", "/tuple/delta"
fontc, fontmake, "gvar/glyphVariations", "glyph", "/tuple/delta"
)


Expand Down
Loading