workaround for bug in defcon
This commit is contained in:
parent
adf3654b33
commit
9d9bfc3eec
1 changed files with 6 additions and 1 deletions
|
|
@ -19,7 +19,12 @@ def ufo_set_wws(ufo):
|
||||||
# TODO: Remove when https://github.com/googlefonts/glyphsLib/issues/821 is fixed
|
# TODO: Remove when https://github.com/googlefonts/glyphsLib/issues/821 is fixed
|
||||||
def fix_fractional_advance_width(ufo):
|
def fix_fractional_advance_width(ufo):
|
||||||
for g in ufo:
|
for g in ufo:
|
||||||
g.width = round(g.width)
|
w = int(round(g.width))
|
||||||
|
# set twice to work around bug or weird behavior in defcon.
|
||||||
|
# If we don't do this, then fractional widths with .0 fraction are
|
||||||
|
# not updated to integer values.
|
||||||
|
g.width = w + 1
|
||||||
|
g.width = w
|
||||||
|
|
||||||
|
|
||||||
def main(argv):
|
def main(argv):
|
||||||
|
|
|
||||||
Reference in a new issue