freetype-devel
[Top][All Lists]
Advanced

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

Re: Strange Text Layout


From: Peter Lofting
Subject: Re: Strange Text Layout
Date: Sun, 6 Aug 2000 20:28:43 -0700

The fields to check in the font are hhea.ascend, hhea.descend and hhea.linegap
These are the fields that should be read by the scaler.

  Peter.

At 1:33 AM +0100 8/7/00, Kevin Dance wrote:
Has anyone else has any problems with the "height" entry of the "FT_Face" structure. I am assuming that this entry is the distance that I need to advance in a downwards direction in order to print multiple lines of text.

My problem is that this works fine for standard fonts such as the Windows ARIAL.TTF but fails horrible when using fonts from the "Expert CD Fonts 1500 True Type Fonts" CD that I have. What happens is that the text overwrites itself because the advance value isn't large enough.

In order to advance the pen position I am using the following code...

   FT_Face Face;
   Advance = Face->height >> 6;

For reference the following is the description of the height entry contained in FREETPYE.H....

" height :: The face's height is the vertical distance from one baseline to the next when writing several lines of text. Its value is always positive, expressed in font units. The value can be computed as `ascender+descender+line_gap' where the value of `line_gap' is also called `external leading'. Only relevant for scalable formats. "

Please can someone tell me if I am doing this correctly and if I am then can someone look at the enclosed font since if it is a problem then it will effect a lot of fonts !

Thanks in advance

Kevin Dance


Content-Type: application/octet-stream;
        name="test.ttf"
Content-Disposition: attachment;
        filename="test.ttf"

Attachment converted: Macintosh HD:test.ttf (????/----) (0003C5F5)




reply via email to

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