Avoid negative hmtx values when creating font from variable font
Fix #2821.
This commit is contained in:
parent
995e5e254d
commit
fd0e81ad13
@ -143,7 +143,7 @@ def interpolate_cff2_metrics(varfont, topDict, glyphOrder, loc):
|
||||
|
||||
if lsb_delta or width_delta:
|
||||
if width_delta:
|
||||
entry[0] += width_delta
|
||||
entry[0] = max(0, entry[0] + width_delta)
|
||||
if lsb_delta:
|
||||
entry[1] = lsb
|
||||
hmtx[gname] = tuple(entry)
|
||||
|
Loading…
x
Reference in New Issue
Block a user