Speaking of fonts...

Matthew Saltzman mjs at ces.clemson.edu
Tue Jul 11 12:20:14 UTC 2006

On Tue, 11 Jul 2006, Tim wrote:

> Tim:
>>> Yep, you're stuffed, because the people providing those options haven't
>>> understood the situation properly (those who design font rendering
>>> engines, and those who get you to set font sizes in pixels in web
>>> browser configurations).  I get the same thing (stupid font sizes).
>>> DPI means how many dots per inch, or pixels in that inch, will be used
>>> to draw the character (how smooth the edges are).  It has *NOTHING* to
>>> do with how big the character should be drawn.
> Matthew Saltzman:
>> There's no magic about "points" either.  There are 72 of them in an inch
>> and that's all one needs to know about them.
> True enough, yet some people don't get the idea that a point size is a
> physical, real world, measurement of size.  It doesn't mean that the
> font should be sized in relation to pixel/dots size.
> i.e. 12 point text is the same size whether printed on paper or screen,
> if you're doing it right.

Right, but one needs to map the fonts to pixels ulitmately.  To get the 
font sizes right, one needs to know the DPI.

> And we get web authors doing stupid things, likewise for applications
> that print text to the screen.

No argument there!

>>> Geez, that problem was dealt with properly on printers ten years ago.
>>> Changing your printer from 24 DPI to 48 DPI, for example, didn't change
>>> the font sizes, unless the driver was written by a complete and utter
>>> moron.  You just got smoother looking fonts, at the same size.
>> Right.  The printer just doubled the number of dots in an inch--it slowed
>> dot-matrix printers to half speed and used twice as much ink.
>> But the printer or its device-specific driver knows how wide/tall a sheet
>> of paper is and the DPI in any mode is fixed.  So it's easy for the
>> printer or driver to know how many dots are in a point.
> Can we not preset the same information into X?  I know you can configure
> the Gimp, and Mozilla (at least older versions), so it knew how many
> centimetres across the screen used how many pixels.  Surely it's not too
> hard to configure X, itself, with a "my screen is x by y cms where the
> display is actually drawn" when setting it up.  (Remembering that with
> PCs, a 17" monitor is a useless description, it measure the entire tube,
> not the usable part of it.  And we have width and height scan controls
> on most CRTs.)

In the GNOME font tool, you can set the DPI (System -> Preferences -> 
Fonts -> Details).  You have to do the measuring and the computation from 
resolution and screen size yourself, though.

>> Displays can't change the number of dots in an inch.
> Oooh, yes and no...  That rather depends on what you're referring to.
> With a CRT I can draw x number of dots across the screen, and it'd be
> using y dots per inch.  I can also change that, on the same screen.  It
> doesn't have to the same number of graphical pixels as phosphor dots.
> However, there's a point where you can't *individually* *resolve* each
> dot, but you can still draw smoother looking curves if you try it.

I didn't quite say what I meant.  My point was that the actual DPI depends 
on (a) the n X m "resolution" of the screen and (b) the physical size of 
the screen image.

> It's not that far removed from 300 or 600 DPI printing.  You cannot see
> each dot, but curved drawing do benefit from the finer detail.

This is just what font-scaling algorithms try to do.  It's not easy.

> LCDs are another matter, you do have a hard limit on the lower
> resolution.
>> LCD displays have the additional ability to use the colored subpixels to
>> get even better effects.
> To be honest, I think that looks far worse than the anti-aliasing you
> get from a CRT, simply due to how the beam scans the phosphors.  It
> smoothes the rough edges by having imperfect focus.  LCDs, on the other
> hand, using the individual coloured pixels to attempt to get more
> resolution, ends up with strangely coloured text.  It's like reading
> badly registered printing where they've not used pure black ink.

You do have to do this carefully and with consideration for the subpixel 
order or it can look awful.  Done right, though, it can look better than 
CRTs--smoother edges, very little loss of sharpness, very little apparent 
color (when viewed from normal distance).

 		Matthew Saltzman

Clemson University Math Sciences
mjs AT clemson DOT edu

More information about the users mailing list