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: Tue, 08 Jan 2002 17:27:36 -0500

Nicola Pero 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.
> 
> Fonts are displayed wrong on my system as well - far too big
> 
> > > 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)))
> 
> As a user and/or as an application writer, I don't understand how this
> is supposed to work.

If the fonts and the graphics disagree on the display resolution, one is
wrong. In this case, it's not the fonts -- the fonts are the right size for
the pointSize you asked for (12, by default -- which is HUGE), assuming X is
configured correctly. X provides you with the information needed to render
graphics in a device-independant manner (see the xdpyinfo tool, which reports
among other things the resolution and size of the display). Really, all you
need is the number of pixels and the DPI of the display, both of which you can
get from X.

My display is 1280x960, with a DPI of 100x100. This says that my viewable
display area is 12.8 inches wide, and 9.6 inches high, and a pixel is one
hundredth of an inch.

On my printer, which has a DPI of 600x300, a pixel is one 600th of an inch
wide, and one 300th of an inch tall, so an equal-length, equal-width line is
exactly 6 times more pixels in width and three times more pixels in height.
So, you *can* bring NeXTstep's WYSIWYG properties to X.

I must say that I thought it was obvious that OpenStep was intended to operate
in a device-independant manner. For example, the way for an app to get the
size of a font is by using its -pointSize attribute, which implies that the
size of a font is to be reported in points, not pixels.

-- 
| 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]