Work around Fontforge underline position bug.

Specifically, when you call generate(), it helpfully adjusts the underline
position by subtracting the underline line width. This means the underline
position for the generated font is lower than the underline position in the
original font, potentially low enough to push it into the next line of text.
This causes weird rendering glitches in (at least) Konsole when displaying
underlined text.
This commit is contained in:
Ben Kelly 2018-01-22 20:16:27 -05:00 committed by Ben Kelly
parent e7856e2027
commit 1ea777f847
25 changed files with 3 additions and 0 deletions

View File

@ -210,6 +210,9 @@ change_font_names(font, output_font['fontname'],
output_font['copyright_add'],
output_font['unique_id'])
# Work around a bug in Fontforge where the underline height is subtracted from
# the underline width when you call generate().
font.upos += font.uwidth
# Generate font & move to output directory
output_name = output_font['filename']

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.