discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Slight problem w/ fonts


From: Jeff Teunissen
Subject: Re: Slight problem w/ fonts
Date: Wed, 26 Dec 2001 13:28:16 -0500

Gregory Casamento wrote:
> 
> I am having a bit of trouble w/ GSFontAntiAlias after my latest update. 
> It seems as though the fonts are being rendered about 2 times larger
> than normal.

The graphic shows that your fonts are being rendered to their point size
instead of their size in pixels, which is how GNUstep (incorrectly) used to
handle fonts.

pixelSize = round (pointSize * (dpi * (1/72)))

On X, typically, the pixel size and the point size are _almost_ the same.
That's because the default configuration sets a DPI of 75, and a point is one
seventy-secondth of an inch., approximately 0.01389 inches. On a 75DPI screen,
a 10-point font is approximately 10.4167 pixels in height, rounded down to 10.

However, most displays in recent years are no longer 75DPI. On my system,
which is calibrated to 100 DPI, the same 10-point font should be 13.8889
pixels in height, rounded up to 14.

There is a bug somewhere in the code, in that the font ascent (maximum
distance from the baseline to the top of a glyph in the font) and descent
(maximum distance from the baseline to the bottom of a glyph in the font) are
causing problems with clipping. The glyphs shouldn't have their tops hacked
off like that. I think that perhaps the baseline isn't being positioned
correctly, because the ascender and descender code seems to look right.

I found that this bug existed when I switched GNUstep to use point sizes
instead of pixel sizes, but I wasn't able to find the cause of it.

[snip]

-- 
| Jeff Teunissen  -=-  Pres., Dusk To Dawn Computing  -=-  deek @ d2dc.net
| GPG: 1024D/9840105A   7102 808A 7733 C2F3 097B  161B 9222 DAB8 9840 105A
| Core developer, The QuakeForge Project        http://www.quakeforge.net/
| Specializing in Debian GNU/Linux              http://www.d2dc.net/~deek/



reply via email to

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