diff options
author | Rasmus Andersson <rasmus@notion.se> | 2022-10-16 02:34:57 +0300 |
---|---|---|
committer | Rasmus Andersson <rasmus@notion.se> | 2022-10-16 02:34:57 +0300 |
commit | 9d9bfc3eecdd7ee17fe36827c400c8dcc0eb4cd5 (patch) | |
tree | e1a2d3bdcd373255bf1551b7836bbf10fe358658 /misc | |
parent | adf3654b33feafaed1741f8e27c3837c6e12715c (diff) | |
download | inter-9d9bfc3eecdd7ee17fe36827c400c8dcc0eb4cd5.tar.xz |
workaround for bug in defcon
Diffstat (limited to 'misc')
-rw-r--r-- | misc/tools/postprocess_instance_ufo.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/misc/tools/postprocess_instance_ufo.py b/misc/tools/postprocess_instance_ufo.py index 37be67d0f..6c09e40cd 100644 --- a/misc/tools/postprocess_instance_ufo.py +++ b/misc/tools/postprocess_instance_ufo.py @@ -19,7 +19,12 @@ def ufo_set_wws(ufo): # TODO: Remove when https://github.com/googlefonts/glyphsLib/issues/821 is fixed def fix_fractional_advance_width(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): |