For Programmers: Free Programming Magazines  


Home > Archive > PostScript > June 2005 > Scale font









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Scale font
Lesley Northam

2005-06-08, 8:58 pm

If I use the following postscript, how tall (in millimeters or inches)
should the resulting text be?

/Courier findfont
12 scalefont
(A) show

Thanks,
Lesley.


Scott Hemphill

2005-06-08, 8:58 pm

Lesley Northam <lanortha@csclub.uwaterloo.ca> writes:

> If I use the following postscript, how tall (in millimeters or inches)
> should the resulting text be?
>
> /Courier findfont
> 12 scalefont


You now need a "setfont".

> (A) show


The font size will be 12 PostScript "points", which are defined as
1/72nd of an inch. The font size is therefore 12/72nds or 1/6th of
an inch.

The font size reflects certain features of its design. It may be,
for example, that the height of a parenthesis is equal to the font
size. Text characters are generally somewhat smaller than the size
of the font.

Scott
--
Scott Hemphill hemphill@alumni.caltech.edu
"This isn't flying. This is falling, with style." -- Buzz Lightyear
Odysseus

2005-06-09, 3:58 am

In article <m3u0k8wpfg.fsf@pearl.local>,
Scott Hemphill <hemphill@hemphills.net> wrote:

> Lesley Northam <lanortha@csclub.uwaterloo.ca> writes:
>
>
> You now need a "setfont".
>
>
> The font size will be 12 PostScript "points", which are defined as
> 1/72nd of an inch. The font size is therefore 12/72nds or 1/6th of
> an inch.
>


Assuming the default coördinate system is in effect, that is.

> The font size reflects certain features of its design. It may be,
> for example, that the height of a parenthesis is equal to the font
> size. Text characters are generally somewhat smaller than the size
> of the font.
>


Typical capital heights are between two-thirds and three-quarters the
nominal point size. Breaking a 'square' letter like E, I, or H from a
given font down to a path with "charpath" and then finding the height of
its bounding box will usually give a fair approximation of that font's
cap-height, but it's dependent on the design -- it's not likely to be
very useful for a script or pi font.

--
Odysseus
Rod Dorman

2005-06-09, 3:58 pm

In article <Pine.LNX.4.43.0506081609030.21209-100000@perpugilliam>,
Lesley Northam <lanortha@csclub.uwaterloo.ca> wrote:
>If I use the following postscript, how tall (in millimeters or inches)
>should the resulting text be?
>
>/Courier findfont
>12 scalefont
>(A) show


The CharMetrics entry for 'A' in the Courier AFM file is
C 65 ; WX 600 ; N A ; B 10 0 590 562 ;

Looking at the character bounding box you can see the lowest Y is 0
(the baseline) and the highest Y is 562. Subtracting lly from ury
results in a height of 562 units.

So a 12 point Courier 'A' will be 12/1000*562 = 6.744 points tall.

--
-- Rod --
rodd(at)polylogics(dot)com
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com