View Single Post
Old 08-28-2024, 12:13 PM   #33
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,918
Karma: 6240958
Join Date: Nov 2009
Device: many
@BeckyEbook,

Okay, I took your ChangeMonoFont-v7.py and tweaked it to create a ChangeMonoFont-v8.py that tries the approach I used for the LiberationMono font.

So when you get a free moment, would you please grab this version and edit it (comment out my LiberationMono font input/output, and uncomment your IBMPlexMono ones and give this a try inside Sigil.)

It seems to give nice (almost double) spacing. Since it does not play with usWinAscent and usWindDescent it may only work on Qt6 apps on Linux. But it worth a shot at things for Windows. I will try it on macOS later today.

Thanks!

ps. It first tries the hhea info, but if it is missing it defaults to using the OS2 usWinAscent and Descent for initial values (setting linegap to 0)

If the USE_TYPO_METRICS flag is not set, it doesn't trust the sTypo values and so fixes the Typo metrics using the gathered above ascent, descent and line gap values, then it sets that flag (updating the version number if needed)

If the USE_TYPO_METRICS flag is set, it assumes they are correct and uses them to fix up the hhea metrics from them.

Then it scales the line gaps values in Typo and hhea and sets them.
It then adjusts the names to meet the spec (no spaces allowed in internal font name) and outputs it.
Attached Files
File Type: py ChangeMonoFont-v8.py (2.4 KB, 119 views)

Last edited by KevinH; 08-28-2024 at 01:37 PM.
KevinH is offline   Reply With Quote