Align font styles to the same baseline
This is how the Source Code Variable Regular
font looks like:
Font demo, download (just place SourceCodeVariable-Roman.otf
or .ttf
in ~/.fonts
).
For some mysterious reason, at certain font weights (including the default 400) Pango reports a height of 19px out of which the ascent is 15px, while at certain other font weights (including the bold 700) the height we get from Pango is 15px and the ascent is 11px.
We measure the dimensions of the regular style (that's okay I guess) and use that for all other styles (bold, italic) too, but don't take potential changes in height and ascent into account, we apparently simply draw each glyph aligining its top. We should align their baselines instead.