Re: Resolutions and combinations
by Andrew McFarland <aamcf(at)aamcf.co.uk>
|
Date: |
Wed, 13 Mar 2002 17:04:35 +0000 |
To: |
<hwg-basics(at)hwg.org> |
References: |
localhost localhost2 |
|
todo: View
Thread,
Original
|
|
At 15:03 13/03/02 +0800, Bert wrote:
>Font size doesn't change the pixels per inch on the screen - it only changes
>the font size. Pixels per inch is dictated by monitor size and screen
>resolution.
Yes and no.
The CSS font-size only changes the font size.
The Windows 9x display property font size changes the number of pixels the
computer regards as one inch: this is the logical `pixels per inch'.
>Examples (will vary from one PC to the next):
>
> 15 inch monitor, with 14 inch displayable area.
> At 800x600, the diagonal is 1000 pixels.
> 1000 / 14 = 71.4 pixels per inch
This is the physical pixels per inch. Normally it doesn't have any
connection with the logical.
Monitors can only display rasterised images. It follows that to display
something at, say, 12 points, it as to convert that length into pixels. It
does this using the logical pixels per inch, not the physical.
Suppose your monitor is set with a logical ppi of 96, and you have a web
page with two DIVs, one set to have a width of 96 pixels and the other set
to have a width or one inch. They will appear to be the same width on the
screen[1], each being 96 pixels wide.
If you now change the logical ppi to say 192 ppi, the 96 pixel wide DIV
will still be 96 pixels wide. The 1 inch wide one will now be 192 pixels wide.
One of the reasons why it is bad to specify font sizes in CSS using pixels
or points is because it is very difficult for the user to make the text
bigger if they need to[2]. To make pixel sized fonts bigger they need to
change the screen resolution. To make point sized fonts bigger they need to
change the logical ppi.
You should always specify font sizes in terms of the em, because it is a
relative unit that scales easily. h1 {font-size 1.2 em}, for example, makes
H1 text 120% of the size of the surrounding text. If the user has the
default size of text set to 12 pt the H1 will be displayed as 14.4 pt. If
they have it set to 10 pt the H1 will be displayed as 12pt. This means that
H1 text is always bigger than body text.
<snip/>
>Hmm. Looks stupid though. But some people may set it to other than the
>standard, just because they can, or because at their resolution, the
>standard may be too small to work with. Or too large for that matter.
I knew someone who had it set to something silly - like 10 - because it
made it easier for him to resize windows.
[1] Assuming your browser isn't magnifying things in any way.
[2] Fortunately most browsers today enable the user to magnify the text
independently of the actual screen settings.
Andrew
--
http://aamcf.co.uk/
HTML: hwg-basics mailing list archives,
maintained by Webmasters @ IWA