View Single Post
Old 08-28-2024, 08:16 AM   #31
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,893
Karma: 6120478
Join Date: Nov 2009
Device: many
Hi BeckyEbook,
Thanks! Nicely done. I tried it on LiberationMono ttf font but since the descender was negative it did not quite work as expected.

The Qt6 FontEngine code uses values as follows:
1. grabs hhea values for ascender and descender and lineGap.
2. if OS2 table exists it replaces them with the sTypo values of the same

So if we modify a font for use in Qt6/Sigil (as opposed to for generic non-qt6 based software), we should probably make sure that those 3 values for hhea ascender, descender, lineGap match the 3 values in the OS2 sTypo if the OS2 table exists, and then set (not clear) the USE_TYPO_METRICS flag.

I will grab the IBM Plex Monospaced font from github and the LiberationMono font from github and dump the metrics just to see if there is any consistency across the various metrics across fonts to see if this approach is even possible.

Perhaps for Linux, your approach of just scaling all metrics and leaving gap at 0 would be more robust.

Thanks!

Last edited by KevinH; 08-28-2024 at 08:22 AM.
KevinH is offline   Reply With Quote