Hey Typophiles,
I'm a software developer working on an application that requires precise font rendering and I'm having trouble doing the calculations correctly.
Here's an example:
A user selects 36 point Helvetica as their font. How far down, in pixels, is the baseline?
Here's my calculation:
12pt is 16px, therefore 1px = 4/3pt.
36pt * 4/3 = 48 pixels
The baseline, per a book I have, "sits one-third the point size up from the bottom", so the baseline in this example would be at 32px.
32px, however, is smaller than the height in pixels of a capital A in 36 point font, which means the top of the A gets chopped off when rendered, so something is off.
What am I doing wrong?