When precise font sizes are necessary use PX not PT! « home
posted on 17:43 - 19 November 2010 | posted by Lev
last modified on 17:44 - 19 November 2010 | last modified by Lev
For some reason, I was always under the impression that specifying a font in terms of "points" (or "pt" in CSS) would render the same size for everyone (albeit except for some fluctuations based on the font-rendering mechanism; e.g.: where fonts sometimes look larger on Linux).
The reality is far from that assumption. Outside of your "zoom" (or font-size) setting in Firefox or your browser of choice, Windows actually has a setting (which you may not even be aware of) which ALSO plays a critical part in this process.
On Windows 7, the setting is found here:
Control Panel > Appearance and Personalization > Display
By default, "Smaller" is set (which is 100%), but if a user has their computer's base font set here as Medium or Larger, all your font-sizes in points will be effected.
This may sound like a no-brainer to many people, and it really 'ought to be. But, I was actually unaware that such a setting even existed.
I have spent a good amount of time troubleshooting such a design/layout issue where just this was at play. For the life of me, my best assumption was the font size (or zoom) was enhanced in the browser itself (in this case Firefox). But even as it was reset, the problem persisted.
As soon as the font sizes were no longer defined in points, but in terms of pixels, the problem went away and the layout looked just as desired.
So it's worth taking into consideration that if you are really anal about keeping your layout and design completely uniform, you should avoid setting the font size in points and instead take the pixel approach. This is extremely important to keep in mind when creating navigation areas, or other boxes in which you expect text to fit.
Related Items »






