Skip to content

Commit

Permalink
Merge pull request #820 from googlefonts/fix-metrics
Browse files Browse the repository at this point in the history
copy_vertical_metrics: apply scaling
  • Loading branch information
m4rc1e authored Jan 30, 2024
2 parents 6ab16b0 + b271fd9 commit d2ec65d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Lib/gftools/fix.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,8 @@ def copy_vertical_metrics(src_font, dst_font):
("hhea", "descent"),
("hhea", "lineGap"),
]:
val = getattr(src_font[table], key)
ratio = dst_font["head"].unitsPerEm / src_font["head"].unitsPerEm
val = int(getattr(src_font[table], key) * ratio)
setattr(dst_font[table], key, val)


Expand Down

0 comments on commit d2ec65d

Please # to comment.