Link to home
Start Free TrialLog in
Avatar of rw8
rw8

asked on

font point size.. what does that actually mean?

what does the point size of the font actually mean?
I write a word in 40 point Times New Roman (using photoshop)
then I measure the height of the characters.. I find that the height is less than 40 points..
and then I draw some 40 point (40 device pixels) characters by writing a Visual C++ program and I measure the font height.. it's not 40 points too (and it's a bit bigger than those I got in photoshop) .. so why is it?
Avatar of siabod
siabod

Fonts have a surrounding white area around them, otherwise the letters would appear stuck together, the point 40 means the rectangular shape around the letter of 40 points high and depending on which font you use the letter will be taller or smaller than other fonts, but if you choose point 40, they will almost be the same height.
siabod, I think you are wrong. Font sizes given in points have nothing to do with pixels as this size describes a specific font height regarding the resolution of the target device. The result is that a 40pt font is of the same physical height on screen as on a printer where the resolution significantly differ (usually 96 or 120 dpi on screen and 300 or 600 dpi on printer).

To calculate the font's height in pixel use:

Font.Height = -Font.Size * Font.PixelsPerInch / 72

Note here that the result is a negative value. Use the absolute value for the font height. The reason why the result is negative has to do with the font mapper which actually picks a specific font...

Ciao, Mike
Lishke is right!

1 Point is 1/72 of an Inch!

So  A 40 Point Typeface should equal 40/72 of an inch!

Avatar of rw8

ASKER

Does anyone know why the font created in Visual C++ and Adobe Postscript files are of different size when displayed on the screen? (both are 72dpi, use the normal parameters)
The question is: are they really different or only differently displayed. How to you show the postscript file, using an emulator (Ghostview etc.)? It may well be that the emulator does not display fonts correctly or it picked another font if the former is not available at a specific size or a specific attribute. The are many flags which can influence the final choice of the font mapper.

Ciao, Mike
a POINT is NOT a pixel. Theyre TOTALLY different. If you measure a font with a POINT ruler you will find that it matches up. Most graphic design rulers have points, picas, and inches on them.

Heres a breakdown

100 pixels= 8 1/3 picas.
There are 12 Points per Pica.
1 Pica is .167 inches.

Now...at 72dpi there ARE 12 pixels per pica which would make a point=a pixel. But at any other rez this wouldnt add up.
Avatar of rw8

ASKER

To let u guys easier to understand what my problem is, I've upload the screen capture of my Visual C++ application and the postscript file i created to:

1. http://www.geocities.com/Tokyo/Bridge/9263/Application/negativefontsize.JPG

I created the font using the following lines:
nHeight =-::MulDiv(360/10, pDC->GetDeviceCaps(LOGPIXELSY), 72);
      m_font.CreateFont(nHeight,0,m_orient*10, m_orient*10,400, m_italic, m_underline, m_strikeOut, DEFAULT_CHARSET, OUT_TT_PRECIS,CLIP_DEFAULT_PRECIS, DRAFT_QUALITY, DEFAULT_PITCH+FF_DONTCARE,m_fontName);

2.http://www.geocities.com/Tokyo/Bridge/9263/Application/positivefontsize.JPG


I created the font using the following lines:
nHeight =::MulDiv(360/10, pDC->GetDeviceCaps(LOGPIXELSY), 72);
      m_font.CreateFont(nHeight,0,m_orient*10, m_orient*10,400, m_italic, m_underline, m_strikeOut, DEFAULT_CHARSET, OUT_TT_PRECIS,CLIP_DEFAULT_PRECIS, DRAFT_QUALITY, DEFAULT_PITCH+FF_DONTCARE,m_fontName);

3. http://www.geocities.com/Tokyo/Bridge/9263/Application/postsctipt.ps
(that is actually a eps file..)

I create the font using:
36 scalefont setfont


I choose Times New Roman font, standard settings in all the three files. (I assume)


Thanx

According to my point ruler thats 36pt. Dont know what the problem is from here.
Avatar of rw8

ASKER

Do you mean the text in the postscript file? How about those in the screen capture files?
Avatar of rw8

ASKER

To print text with a particular font size (for example: 36).. is that I should use this in the OnDraw function?

nHeight =-::MulDiv(36, pDC->GetDeviceCaps(LOGPIXELSY), 72);
m_font.CreateFont(nHeight,0,m_orient*10, m_orient*10,400, m_italic, m_underline, m_strikeOut, DEFAULT_CHARSET, OUT_TT_PRECIS,CLIP_DEFAULT_PRECIS, DRAFT_QUALITY, DEFAULT_PITCH+FF_DONTCARE,m_fontName);
ASKER CERTIFIED SOLUTION
Avatar of zeetree
zeetree

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rw8

ASKER

Thanx Zeetree.. I think I got what I needed now. And thanx to other guys who gave me their valuable comments