Correct PANOSE Letterform value and extend to implausible weights

This commit is contained in:
Ben Harris 2024-09-27 10:57:22 +01:00
parent 11d38bb34e
commit 9c346371c7

View File

@ -3042,10 +3042,14 @@ dopanose(void)
/*
* We declare that our O is not Off Center.
*
* OutCurv similarly seems to be independent of XPIX, and for
* all reasonable weights it falls within the "Boxed" range.
* Like Speed, OutCurv seems to be independent of XPIX.
*/
panose[7] = 5; /* Normal/Boxed */
if (weight->weight <= -80)
panose[7] = 3; /* Normal/Weighted */
else if (weight->weight <= 90)
panose[7] = 4; /* Normal/Boxed */
else
panose[7] = 5; /* Normal/Flattened */
/*
* TrimRat is independent of XPIX.
* TrimRat = ((100-2*XQTR_S) + weight->weight) / (100 + weight->weight)