Staticfree Blog

I have been asleep for 19 minutes, and 21 seconds. Before that, I was at home.

Fri, 13 May 2005

Many people have websites that have poorly-chosen font sizes and they don't even realize it. They use the unit of measurement known as "pt", thinking that it will make font sizes more consistent. This is akin to the people who make a website design and change the foreground color, but leave the background color to be the default. In both cases, the designer made bad assumptions about the reader's configuration.

To the point

A screenshot of a popular website as seen on my small laptop screen Shown here is a popular website as seen on my small laptop screen. The text on the left window is much too large for the design. Compare to the window on the right that respects the browser's default font size.

You should not use point sizes for screen font sizes. Instead, you should use pixels, as no doubt the rest of your website is designed based on pixels. If it's not pixel-based and it's relative (yay!) then let the user choose (by using the default font size and relative sizes from that). This is because screen resolutions are not all the same and users generally know best when it comes to what font size they prefer reading.

In your site's CSS, instead of font-size: 12pt use font-size: 14px. These should look roughly the same on a normal, 85 DPI screen (see below for talk on DPI) but on a high-res screen (say, 141 DPI) 12pt text is 23 pixels high! If your site design is done in pixels - that's going to be a problem.

Nifty! Google's calculator can convert from pt to px at any given DPI. Just enter "12 points in inch / 85" (try it) in the search box and it'll give you "14.1666667 inch / 85" aka "14 pixels". You can do the same thing using the *NIX units program. If you know your DPI, you can just replace "85" with the appropriate DPI.

See more ...

trackback enabled :: 5 comments

Recent Comments

Categories

B6 d+ t++ k+ s u- f- i+ o++ x++ e++ l c-- (decode)

Archive by date

May
Sun Mon Tue Wed Thu Fri Sat
13
       
2005
Months
May
If you can read this text, you're either on a browser that doesn't support CSS or one that supports it badly. You've probably noticed that my layout is a bit choppy and perhaps even ugly. My layout here is designed to work in all browsers that support CSS 1 and 2 and was designed by reading the W3C CSS recommendations. It was tested in the most CSS-compliant browser I know of, Firefox. If you want this page (and others too!) to look nice, I reccomend trying Firefox - it's completely free and can also block those annoying popup ads out-of-the-box.

Powered by Blosxom Atom RSS 1.0 RSS 1.1 RSS 1.0 no comments Technorati Profile GeoURL Valid XHTML 1.0! Valid CSS!

Creative Commons License
All original sound, text and graphics on this site (staticfree.info) are licensed under a Creative Commons License.