Re: Font scaling and string size problem?!?
Re: Font scaling and string size problem?!?
- Subject: Re: Font scaling and string size problem?!?
- From: glenn andreas <email@hidden>
- Date: Fri, 16 Sep 2005 15:00:09 -0500
On Sep 16, 2005, at 1:18 PM, Ondra Cada wrote:
Gerriet,
thanks for your answer,
On 16.9.2005, at 18:37, Gerriet M. Denkmann wrote:
I've always thought that fonts scale linearly, in the sense that if
"XYZ" in 10pt font happens to be an inch wide, then in the same font
scaled to 20pt it would be two inches. Right?
Yes, for real fonts this should be true.
Seems it should not.
Actually, it definitely should not, far as typography is concerned
-- but I've been pretty positive that PostScript or TrueType fonts
do not support the fact that, say, 60pt 'a' should not be just the
10pt 'a', six times linearly enlarged -- it should have different
proportions, being designed for the big size, whils the 10pt 'a'
is, well, designed for the small size. I've always thought only
METAFONT supported this distinction, whilst the newer and more
widely used means to describe letters lack the support alltogether.
Well it looks like I was wrong :)
There are actually two different things that come into play here,
though both are related to readability.
The first, and most obvious, is the hinting that is needed to make
fonts look good on limited resolution devices (such as on screen).
For example, if you make an "m" narrower than 5 pixels, you'll have
to give up one of the pixels of white space between the legs of the
m. Equally, if you make it 6 pixels, you've got one extra pixel
that, in the wrong place, makes the glyph really ugly. As a result,
all decent fonts have tables of "hints" in them to make them look
like the older, hand tuned bitmap versions. This is all due to the
fact that we've got limited resolution for output (be it to screen,
or even to a 300 dpi laser printer). This, however, obviously isn't
an issue in traditional typesetting (since there's no underlying grid
you need to arrange the atoms of lead on), and TrueType was one of
the outline font technologies to provide support for this (Postscript
fonts did not at the time).
The other issue is the more theoretic issue of "optical scaling".
This even matters in the "lead type" world - from the comp.font FAQ:
As a character gets smaller, the relative thickness of strokes,
the size of serifs, the width of the character, the
inter-character spacing, and inter-line spacing should increase.
Conversely, as a character gets larger, the relative thickness,
widths, and spacing should decrease.
So this actually means that the shape of the characters themselves
change as the point size changes (and skilled typographers were
needed to make slightly different versions of their fonts for
different sizes). This can be accomplished by the same technique of
hinting that is used for pixel rendering, though fewer fonts do this
(and the whole thing starts getting into a whole morass when you
throw in stuff like "multiple master fonts"), but I believe that
METAFONT did.
So as a result, the metrics of a font changes with the size in a non-
linear form for both practical and aesthetic reasons, so it would be
extremely rare if a string in 60pt text were exactly 6 times wider
than 10pt text (sometimes you're lucky if it is 6 time taller).
Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
Widgetarium | the quickest path to widgets
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden