But I just read that there is a flag value in a ttf file that tells it to use its Typo Metrics over Win Ascent and Descent values. I can set it easily in FontForge but I have no idea how to set it in python fontTool.
So my way may never work except with FontForge
Update:
in the OS2 table is the field fsSelection in bit 7 (128) is the USE_TYPO_METRICS flag which is not directly supported in fontTools.
Also it is clear that hhea , usWinAscent, usWinDescent, and the OS2 table values are really inconsistent in some shipping fonts and they do not fit with the em_square value which must be a power of 2.
So what the spec says and what is actually out there in the wild is very inconsistent.
Last edited by KevinH; 08-27-2024 at 08:51 PM.
|