![]() |
Font SizeAs explained in Screen Dots Per Inch one gets the font size in pixels by multiplying the font size in inches by the screen dpi. This calculated font size, the font name, and a whole raft of other parameters, are passed to the Windows Application Programming Interface (API) which then instantiates the font so that the font driver can actually create it. Windows functions that create screen fonts require the requested font size to be in pixels, not points, so every application that allows you to choose a screen font size in points has to convert that point size to pixels, using the screen dpi value, before requesting the API to create the font. A program can, however, bypass this calculation by allowing screen font size to be directly specified in pixels and screen dpi is then ignored because a points to pixels conversion is not required. Firefox is one program that allows font sizes to be specified in pixels, and uses 16px as the default value.
Internal leading, pronounced ‘ledding’, is the space for diacritics (accent marks). Arial 12pt at 96 dpi:
font size in points 12
font size in pixels = ------------------- × 96 dpi = ---- × 96 = 16 pixels
72 points per inch 72
The font name and requested font size (in pixels) is passed to the API. After the font is created its actual parameters can be obtained from, you guessed it, the API and this says that for Arial with a font size of 16 pixels: ascent = 15 pixels, descent = 3 pixels, internal leading = 2 pixels Arial 48pt at 110 dpi:
48
font size in pixels = ---- × 110 = 73 pixels
72
ascent = 66 pixels, descent = 16 pixels, internal leading = 9 pixels
Let’s compare two quite different fonts having exactly the same font size i.e. Scriptina 48pt at 96 dpi and Arial 48pt at 96dpi.
48
font size in pixels = ---- × 96 = 64 pixels
72
|
| © 2006 - 2010 Richard Mason |