freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Devel] PFR-fonts; external leading, ascender, descender and height prob


From: Harri Smått
Subject: [Devel] PFR-fonts; external leading, ascender, descender and height problems
Date: Tue, 3 Aug 2004 17:12:43 +0300

I've been trying to fetch information about PFR-fonts using freetype2 and came 
up with few possible bugs (ft219)



1. External leading  (pfr/pfrload.c)

http://www.mhp.org/documents//mhp_Ts101812.V1.3.1.pdf.zip  (7.4 Downloadable 
fonts)

States that external leading should be loaded from auxiliry data as :

    phy_font->ascent  = PFR_NEXT_SHORT( q );
    phy_font->descent = PFR_NEXT_SHORT( q );
    q += 4     // fix/addition
    phy_font->leading = PFR_NEXT_SHORT( q );

First short after descent seems to be sum ascent+descent - at least for fonts 
I've tested so far.



2. Ascender, descender, height

(pfr/pfrload.c   pfr_phy_font_load)
phy_font->ascent and phy_font->descent are supposed to be bbox.yMax and 
bbox.yMin, if they are not overwritten using auxiliary data.

(pfr/pfrobjs.c   pfr_face_init)
Problem is that phy_font->ascent/descent are never used, because pfr_face_init 
simply sets ascender from phy_font->bbox.yMax and descender from 
phy_font->bbox.yMin . They are supposed to be phy_font->ascent/descent if I'm 
right.

face->height calculation might also be false. Currently  ((phy_font->bbox.yMax 
- phy_font->bbox.yMin)*1.2)  , which certainly is not same as documentation 
states (face->ascender - face->descender + phy_font->leading);



I'm not familiar with patches, but I'll try producing one if my explanation/bad 
english makes no sense at all  :D

--
harri



reply via email to

[Prev in Thread] Current Thread [Next in Thread]