OK, I've had a closer look into this and the solution is really simple. First, here's the problem. First, the code:
<head>
<style type="text/css">
<!--
.pixelheight {
font-family: "Times New Roman", Times, serif;
font-size: 16px;
}
.pointheight {
font-family: "Times New Roman", Times, serif;
font-size: 10pt;
}
-->
</style>
</head>
<body>
<table>
<tr><td class="pointheight">Times 10pt<td></td><td class="pixelheight">Times 16px</tr>
<tr><td bgcolor="#1111FF"width="100" class="pointheight">
This is a bunch of text that you might want to have in a column that neatly fits down the side of your page in keeping with the design
</td>
<td width="100"></td>
<td bgcolor="#00CC00" width="100" class="pixelheight">
This is a bunch of text that you might want to have in a column that neatly fits down the side of your page in keeping with the design
</td></tr>
</table>
</body>
- <head>
- <style type="text/css">
- <!--
- .pixelheight {
- font-family: "Times New Roman", Times, serif;
- font-size: 16px;
- }
- .pointheight {
- font-family: "Times New Roman", Times, serif;
- font-size: 10pt;
- }
- -->
- </style>
- </head>
- <body>
- <table>
- <tr><td class="pointheight">Times 10pt<td></td><td class="pixelheight">Times 16px</tr>
- <tr><td bgcolor="#1111FF"width="100" class="pointheight">
- This is a bunch of text that you might want to have in a column that neatly fits down the side of your page in keeping with the design
- </td>
- <td width="100"></td>
- <td bgcolor="#00CC00" width="100" class="pixelheight">
- This is a bunch of text that you might want to have in a column that neatly fits down the side of your page in keeping with the design
- </td></tr>
- </table>
- </body>
Basically, the code sets a 3 column table - in the left column, it uses css code to define a times font size 12pt. The right column defines a times font, size 16 pixels.
On a system with normal-sized fonts you'll get the following results (screenshot):
<img src="http://wwwisg.cs.uni-magdeburg.de/~nick/tmp/normal.png" border=1></img>
On computers with scaled fonts set (like my laptop), you'll get this instead:
<img src="http://wwwisg.cs.uni-magdeburg.de/~nick/tmp/scaled.png" border=1></img>
Notice how the left (blue) column changes appearance on different systems, because there the fonts have been set using point size, whereas on the right (green) column, the text wraps around the box in the same way on both cases, because it's defined as a pixel size.
The take-home message!?
When you are carefully aligning text so that it flows with your design, speak the language of graphic design -- in pixels!!! So define your font size in pixels!
I've seen so many websites that use point size fonts, rather than using css for pixel size fonts. And sure...its a minority of systems that used scaled fonts, but if you're using css, then its not hard to specify pixel heights instead of point heights for fonts.