FreeType: Return 0 if СapHeight not present in TTF. Patch by Andrey Zubarev, issue #41173.

There are many fonts where СapHeight is either missing or zero. This
fact cannot be hidden from the application, application must process it.


(cherry picked from commit 730e2a4ae7)

Co-authored-by: Maxim Ganetsky <maxim@lazarus-ide.org>
This commit is contained in:
Maxim Ganetsky 2024-10-06 15:21:58 +00:00 committed by Maxim Ganetsky
parent a12d941545
commit 2d54bf3fda

View File

@ -1347,7 +1347,7 @@ begin
if prop.os2^.version >= 2 then
FCapHeight:=prop.os2^.sCapHeight
else
FCapHeight:=FAscentValue;
FCapHeight:=0;
FAscentValue /= FUnitsPerEM;
FDescentValue /= -FUnitsPerEM;