freetype
[Top][All Lists]
Advanced

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

[ft] Incorrect text spacing.


From: address@hidden
Subject: [ft] Incorrect text spacing.
Date: Tue, 2 Jun 2009 13:39:09 -0400
User-agent: Thunderbird 2.0.0.19 (X11/20081209)

Hello:

Pardon me if this is not the proper venue
to post this issue. I did not know where
else to start.

I am using the Qt (Trolltech/Nokia) toolkit
to write C++ applications on the Linux/X11 platform.

BUT, all text appears to be improperly spaced.
The line spacing is too large.
Upon examination the ascent and descent
font metrics appear to be ~50% too large.

I grew up with the understanding that ascent
was typically the distance from the base-line to the top
of the lower case 'd' character and the descent
was typically the distance from the base-line
to the bottom of the lower case 'y' character.
You add a little leading and you have the line-spacing.

There is a nice picture here:
    
http://developer.apple.com/documentation/Cocoa/Conceptual/FontHandling/Tasks/GettingFontMetrics.html

But, the font metrics from Qt show ascent and descent
numbers which are typically 50% larger than this
resulting in visually unacceptable text spacing.

This does not appear to be a Qt-only problem
as I have also observed the same over-spacing
in applications written with the wxWidgets toolkit.

Qt tech-support blames the X11 layers (FontConfig, Truetype etc.)
for providing incorrect font metrics.

Is this true or are they misinterpreting the numbers?

It is hard to believe that 20+ years after the invention
of X11 that there are still font problems.

How do I fix this problem (at a low level) so that
text looks properly spaced in my applications?

Thanks in advance.

Bill





reply via email to

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