Hi BeckyEbook,
Very nice!
But instead of scaling up the ascent and descent values there is a typo line gap (and similar line gap values for hhea) value that does not actually scale the drawn glyphs but instead just grows the gap between lines.
So I just add the current ascent plus descent (as a positive value) and and take 50% of it and make that the typo line gap value stead of 0 (for 1.5 line spacing).
That keeps font size exactly the same in QT QFonts but increases line spacing.
Does that python fontlib make it easy to try that?
Thanks!
Kevin
Update, checking the ttflib code the values I want to play with are:
Code:
ttLib.getTableClass("hhea"),
(
"ascent",
"descent",
"lineGap",
...
and
Code:
ttLib.getTableClass("OS/2"),
(
...
"sTypoAscender",
"sTypoDescender",
"sTypoLineGap",
"usWinAscent",
"usWinDescent",
"sxHeight",
"sCapHeight",
),
are sTypoLineGap in the OS2 table and lineGap in the hhea table.
I am away from my Desktop so if you have a free moment would you try that. Based on my reading of the qfontengine code, this should work on all platforms under Qt6.
Quote:
Originally Posted by BeckyEbook
Works!
scale=1.1 means increasing the offset by 10%.
Before: pip install fonttools
|