discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Slight problem w/ fonts


From: Nicola Pero
Subject: Re: Slight problem w/ fonts
Date: Mon, 7 Jan 2002 22:38:49 +0000 (GMT)

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

We draw lines and rectangles and fill colors using pixels.  All right,
probably in postscript if you draw a line of width 1 and length 3 in the
standard scaling that is supposed to draw a line of xxx millimeters of
width and 3*xxx millimeters of length, but the fact is we ignore that and
always draw a line of width 1 pixel and length 3 pixel (I seriously doubt
you can draw lines in millimeters on the screen anyway, since the pixel
size depends on the monitor and I don't think there is a way you can know
the exact pixel size from software, and if you can't know the exact pixel
size, no way you can draw in millimeters, you can only draw in pixels).

So if the application is drawing a rectangle of, say, height 14, that
means height 14 pixels, and if the app wants to put some text inside it so
that it fits, now the application writer makes some tests, chooses a font
with a size that fits, and uses that one (regardless of whether he is
using Gorm or coding stuff by hand, it's the same process, he draws the
rectangle using pixels, and chooses a font and a font size for the text to
be drawn inside the rectangle).

But if you rescale the font pixel size of the same font depending on the
graphical configuration, while you don't scale the size of the drawn
rectangle, then you change the relative size of the font to the graphics
depending on the configuration, making the task of writing applications
which have the same appearance on all configurations impossible ...
depending on the configuration, the font will fit or not fit inside the
rectangle ... and in no way you can fit the font inside the rectangle,
unless you write code to rescale the rectangle each time you draw
depending on the size of the font on that machine ... which just breaks
all the framework.

It's very counter-postscript in my opinion to scale fonts basing on the
screen but not to scale the graphics depending on the screen ... that
breaks the fact that the relative dimensions and positions are the same
regardless of the output device, which as far as I know is one of the good
things of postscript.

Where is the problem btw with using pixels as the base size when drawing
on screen ?


> Thank you Jeff for the good explanation of pixel and point sizes. So now
> all of us should accept that the changes I did make here were needed and
> mostly correct.

It's very difficult to be happy with changes that have broken the size of
all fonts for all gui elements.

Font sizes were determined - in pixels - to match and fit in the rest of
the graphics.  They were determined in pixels because all the rest of the
graphic sizes are determined in pixels.  Now the font sizes no longer
match the rest of the graphics - the text displayed in menus, browsers,
tables, buttons is far too big for the space which was given to it.  This
is something which needs to be fixed - the size of the text *must* match
the space which is allocated to it by the graphics - regardless of the
output device.  Appearance *is* important.  I wonder if you see the same
disaster in font scaling that I see on my system or if perhaps on your
systems the font scaling is better so you don't realize the problem.

So please take the problem of the relative scaling of fonts to graphics
seriously.




reply via email to

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