POV-Ray : Newsgroups : povray.off-topic : Font metrics Server Time
5 Sep 2024 01:21:17 EDT (-0400)
  Font metrics (Message 17 to 26 of 26)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Shay
Subject: Re: Font metrics
Date: 3 Nov 2009 16:41:10
Message: <4af0a376@news.povray.org>
Invisible wrote:
> 
> In other words, given a 10pt font, there is no way to determine how tall 
> or wide any of the letters are. (E.g., they could be 10pt, 1pt, 
> 1000pt...) This is very helpful. :-/

Look in the font file. It can be converted to human readable with 
probably several things. I use fontforge.

> 
> As I say, it appears to be exactly 6pt. But I have no idea why...

Correct.

  -Shay


Post a reply to this message

From: Orchid XP v8
Subject: Re: Font metrics
Date: 3 Nov 2009 16:42:05
Message: <4af0a3ad@news.povray.org>
>> In other words, given a 10pt font, there is no way to determine how 
>> tall or wide any of the letters are. (E.g., they could be 10pt, 1pt, 
>> 1000pt...) This is very helpful. :-/
> 
> Look in the font file. It can be converted to human readable with 
> probably several things. I use fontforge.

The PostScript Courier font is hard-wired into the printer. I have no 
idea how to get at it.

>> As I say, it appears to be exactly 6pt. But I have no idea why...
> 
> Correct.

Much experimentation and many trees later... ;-)

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: clipka
Subject: Re: Font metrics
Date: 3 Nov 2009 18:06:52
Message: <4af0b78c$1@news.povray.org>
Invisible schrieb:
>>> Well, by a series of experiments, I have discovered that the neither 
>>> the character width or character hight of Courier 10pt is actually 
>>> 10pt. The distance from the baseline to the capline is more like 
>>> 5.5pt or something, and the distance between characters appears to be 
>>> exactly 6pt...
>>
>> Yes, the "pt" in fonts is a rather arbitrary measurement. I guess in 
>> traditional typesetting it would refer to the height of the metal 
>> "block" from which the letters were cut, so even there it would be 
>> only indirectly related to the actual glyph dimensions.
> 
> Well, the glyph will be smaller than the metal block to allow some 
> whitespace around the glyph. But you'd think 10pt would be either the 
> width or the hieght of the block... Apparently it is neither.

Note that the block had to accomodate not only capital letters, but also 
underliners, as well as accent symbols above capital letters; so if the 
capital letters are 5.5 pt in height, a block height of 10 pt appears 
realistic to me.


Post a reply to this message

From: clipka
Subject: Re: Font metrics
Date: 3 Nov 2009 18:42:07
Message: <4af0bfcf$1@news.povray.org>
Invisible schrieb:

> In other words, given a 10pt font, there is no way to determine how tall 
> or wide any of the letters are. (E.g., they could be 10pt, 1pt, 
> 1000pt...) This is very helpful. :-/

Exactly.

There's some meta-information in font files though.


> Still doesn't help me figure out how wide the letters of Courier 10pt 
> are. (Being a monospace font, all the letters should be the same width...)
> 
> As I say, it appears to be exactly 6pt. But I have no idea why...

Typewriters typically used a spacing of 10 or (less commonly) 12 
characters per inch, i.e. a character width of 7.2 pt (10 cpi) or 6.0 pt 
(12 cpi).

With 10 pt and 12 pt being the most common nominal font sizes on 
computers, it makes sense to design a pixed-pitch font to match the 
common typewriter pitch of 7.2 pt (to be able to print on forms 
originally designed for typewriters) at a nominal font size of 12 pt, as 
this also allows to emulate the 6.0 pt pitch by simply changing the 
nominal font size to 10 pt.

Hence the exact 6 pt pitch of the Courier font at a nominal font size of 
10 pt.


Post a reply to this message

From: clipka
Subject: Re: Font metrics
Date: 3 Nov 2009 18:44:25
Message: <4af0c059$1@news.povray.org>
Warp schrieb:

>   (And the "height" is that between two baselines in the font. The font
> graphics themselves can go over those lines.)

That's actually not true - at least not in practice. Instead, word 
processing software will usually adjust the line spacing to some other 
font properties.


Post a reply to this message

From: clipka
Subject: Re: Font metrics
Date: 3 Nov 2009 19:17:19
Message: <4af0c80f$1@news.povray.org>
Orchid XP v8 schrieb:
>> And there is 72 points to the inch.
> 
> Depending on who you ask. ;-)
> 
> (PostScript assigns 72 points to the inch, TeX assigns 72.72, and 
> apparently other systems assign yet other values.)
> 
> Fortunately, in this instance I'm only interested in PS.

The traditional US-american printers' "pica point" was defined for one 
pica (12 points) to be 0.166 inch (giving ca. 72.29 points per inch). 
TeX, being quite traditionalistic regarding typesetting, probably bases 
its definition on this older standard, although I'm quite puzzled why it 
uses the slightly lower value of 72.27 (not 72.72). Maybe it has to do 
with the evolution of the inch since the day the "pica point" was 
standardized. Also, there seems to have been alternative suggestions for 
the definition of the pica point back in the time when it was 
standardized in 1886, one if which would have resulted in exactly 72.27 
points per inch.

However, /the/ "DTP point" gives exactly 72 points per inch, and any 
software using a different definition is a rare exception.


Post a reply to this message

From: SharkD
Subject: Re: Font metrics
Date: 3 Nov 2009 23:39:48
Message: <4af10594$1@news.povray.org>
On 11/3/2009 7:17 PM, clipka wrote:
> The traditional US-american printers' "pica point" was defined for one
> pica (12 points) to be 0.166 inch (giving ca. 72.29 points per inch).
> TeX, being quite traditionalistic regarding typesetting, probably bases
> its definition on this older standard, although I'm quite puzzled why it
> uses the slightly lower value of 72.27 (not 72.72). Maybe it has to do
> with the evolution of the inch since the day the "pica point" was
> standardized. Also, there seems to have been alternative suggestions for
> the definition of the pica point back in the time when it was
> standardized in 1886, one if which would have resulted in exactly 72.27
> points per inch.
>
> However, /the/ "DTP point" gives exactly 72 points per inch, and any
> software using a different definition is a rare exception.

Pica pica!

       .
       |\
       | \.,,,__________
      /            __!!/
     |(%)    (%)   \
    ()   .     ()  |
     \  ,.,        /
     /             \
  \"/        \''\  |
    \            <_/
     \          <_,|
      .,..,,/"/,  /\\
      \  |  \____/  \\
       ""         __//
           _____ ||''
          /  / \\||
         /  /   \,|
        |__|     \/


Mike


Post a reply to this message

From: SharkD
Subject: Re: Font metrics
Date: 3 Nov 2009 23:57:41
Message: <4af109c5$1@news.povray.org>
On 11/3/2009 5:49 AM, Invisible wrote:
> Does *anybody* here know what the hell the width of each character in a
> Courier 10pt typeface is?! (Apparently it isn't 10pt.)

So, have you found a single guide which answers all your questions? I'm 
interested in learning about it too.

Mike


Post a reply to this message

From: Invisible
Subject: Re: Font metrics
Date: 4 Nov 2009 04:26:34
Message: <4af148ca$1@news.povray.org>
SharkD wrote:

> Pica pica!
> 
>       .
>       |\
>       | \.,,,__________
>      /            __!!/
>     |(%)    (%)   \
>    ()   .     ()  |
>     \  ,.,        /
>     /             \
>  \"/        \''\  |
>    \            <_/
>     \          <_,|
>      .,..,,/"/,  /\\
>      \  |  \____/  \\
>       ""         __//
>           _____ ||''
>          /  / \\||
>         /  /   \,|
>        |__|     \/
> 

Oh dear God... >_<


Post a reply to this message

From: Invisible
Subject: Re: Font metrics
Date: 4 Nov 2009 04:27:36
Message: <4af14908$1@news.povray.org>
SharkD wrote:
> On 11/3/2009 5:49 AM, Invisible wrote:
>> Does *anybody* here know what the hell the width of each character in a
>> Courier 10pt typeface is?! (Apparently it isn't 10pt.)
> 
> So, have you found a single guide which answers all your questions? I'm 
> interested in learning about it too.

Nope. In the end, I had to measure the metrics emperically. Google was 
useless.


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.