freetype
[Top][All Lists]
Advanced

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

Re: [ft] Incorrect text spacing.


From: address@hidden
Subject: Re: [ft] Incorrect text spacing.
Date: Wed, 29 Jul 2009 08:24:08 -0400
User-agent: Thunderbird 2.0.0.19 (X11/20081209)

To recap:

I am using Qt to write an application.
The line spacing for all text in the app appears to be too large.
The numbers below show that Qt is properly using the ascent and descent
metrics from the FreeType metrics struct (the /64 numbers).
My expected numbers (below) are as actually measured to the top of
the 'h' char and bottom of the 'p' char. I believe these are the proper
ascent/descent numbers for the font. Note that they are smaller than the
reported numbers. I believe that, had FreeType reported these numbers,
Qt would have properly spaced my text.
An inspection of all fonts on my Linux box reveals that most
of them have over-stated a/d metrics.
I am not blaming FT. It may just be forwarding metrics
from the underlying font.

What should I do?

Example values for a real font.

Font: Courier 12 Point.

At which DPI?

100 DPI

Without this information, point values are meaningless.
Additionally, there are zillions of `courier' variants.  EXACTLY which
font?  Which version?  Which vendor?  They might define vertical font
dimensions differently

Have not figured out how to determine that info yet.



ft_face->size->metrics.ascender :  896, /64: 14
ft_face->size->metrics.descender: -320, /64: -5
FT_IS_SCALABLE(face) : 1

Expected-ascent  : 9
Qt ascent        : 14
Expected-descent : 3
Qt descent       : 5

Those values are pixels?  Points?


I believe those are pixels.
Note that the Qt ascent and descent numbers
match those returned from the FreeType metrics struct.
So, it does not appear that Qt has misinterpreted the numbers.

Do you use B/W rendering?  Or anti-aliasing?


Anti-aliasing is in play.


    Werner







reply via email to

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