Fira Code punctuation characters (a) vary in horizontal advance among
themselves and (b) may not match the horizontal advance or glyph width
of the target font. This change fixes the horizontal advance when
copying individual characters.
Depending on the width of the copied characters (relative to the input
font) and the setting of --scale-character-glyphs-threshold, it will
also either scale the copied glyphs horizontally, or simply center them
inside the now correctly sized hbox.
Note that this only applies to individual characters (and thus is a
no-op if the user hasn't turned on individual character copy with the
--copy-character-glyphs option); properly scaling ligatures is still a
work in progress.
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.
If fontforge crashes or is otherwise interrupted, you can just regenerate
the font; I think the risk of leaving a half-generated font file around is
less than the risk of unexpectedly overwriting something in the current
working directory, which is what the previous behaviour did.
This matches the behaviour of Fira Code, where long runs of identical
characters don't get ligaturized; for example, with this change,
`######` will get ligaturized as six `#` characters, rather than as
three `##` characters.
This updates the FiraCode OTFs to version 1.204, and makes ligaturize.py
infer which one to use based on the name of the output file; e.g. if you
name your output `Ligaturized-Bold` or `Ligaturized-BoldItalic`, it will
use `FiraCode-Bold.otf` as the ligature source.
It also lets the user explicitly specify the ligature source as a third
command line argument if the inference is wrong (which opens the door to
using non-Fira Code ligatures, too).
In particular, this means you can generate (e.g.)
'CousineLigatures-Regular.ttf' and 'CousineLigatures-Bold.ttf', and they
will both be in the font family 'Cousine Ligatures'.