Skip to content

Commit

Permalink
[scale-upem] Err on CFF fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
behdad committed Aug 15, 2022
1 parent 4b472cb commit e285088
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Snippets/scale-upem.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ def visit(visitor, varData):
font = TTFont(sys.argv[1])
new_upem = int(sys.argv[2])

if 'CFF ' in font or 'CFF2' in font:
print("scale-upem: CFF/CFF2 fonts are not supported.", file=sys.stderr)
sys.exit(1)

upem = font["head"].unitsPerEm

visitor = ScalerVisitor(new_upem / upem)
Expand Down

0 comments on commit e285088

Please sign in to comment.