Post Archive

› February 11, 2004

What's the point of using pixels?

  • Reported by liorean

Well, yes, this is another font sizing post. In it I'll tackle why I think points should be used instead of pixels for absolute sizes, as well as the reason for the pixel/point size discrepancy between platforms.

Any web designer today know that text sized in points is considered an considered an accessibility problem, and that pixels are better. This is all based on one single thing: How large DPI (dots per inch) ratio the user environment has. Classic Mac have traditionally had 72 DPI for standard resolution, while Windows uses 96 DPI for small fonts, 120 DPI for large fonts. Now, how does the DPI affect font sizes?

Well, on 72 DPI one point equals one pixel, so you could say that we have a 72 px per inch and a 72 pt per inch in that case. However, the pixel size is realative to the screen resolution and does not change with the DPI. The pt per inch follows the DPI, so at 96 DPI, the px per inch is 72 but the pt per inch is 96. So, that means that if you specify a font size of 12pt in a 72 DPI system, you get 12 pixels large text. If you specify a font size of 12pt in a 96 DPI system, you get a 12*(96/72) = 16 pixel large text. In other words the Classic Mac renders all text at three fourths the size they render in Windows. On the other hand, if you specify a font size of 12pt, a 120 DPI system will render it at 12*(120/72)=20 pixels. That is a 3/5 size difference in one dimension - 9/25 area difference. In other words, the character is close to three times as large on the Windows system with large fonts as they are on the Classic Mac. If you compare a 16px font size on the different systems instead, you will find it to be 16 points large on the Classic Mac, 12 points large on the Windows with small fonts, and 9.6 points large on the Windows system with large fonts.

Now, the pixels per inch is realtive to the screen resolution alone. The points, on the other hand, are relative to the DPI, which in turn is set to a certain value that is relative to the resolution. If you want to scale up a font; e.g. to compensate for an increase in resolution, or because you have poor vision; you can change the DPI. This means higher DPIs than 96 are both going to get more usual as resolutions rise, and that the people using high DPIs are the people that really need to. The people that use lower DPI than 96 are in mostly Mac users that have not yet left Mac OS 9. It should be noted that all modern Mac browsers use 96 DPI as default, so they are not affected by this problem - in that direction.

Essentially, that means that if you are using absolute font sizes, you can chose pixels to compensate for small size in Classic Mac, but in effect hurt accessibility because you lower the size the text would render at for a person that because of poor vision has set his or her DPI on a higher value. Or, you can use points, which are sized according to the DPI for the user with poor vision, but hurt accessibility because you size the text down for users of ther Classic Mac. Using pixels make designs backwards compatible to an operative system that is being phased out. Using points make designs forward compatible and help people with poor vision. The question you should be asking yourself here is: What group should I prioritise? Are really pixels better than points for me?

The obvious solution to the problem would be to not use absolute font sizes. Em are relative to the user's default font size, and are relative to the DPI. The same goes for per centages. The same goes for the relative keywords. And yes, even the absolute keywords, because they are also relative to the default size. The absolute keywords have their own problems, however - the default was small instead of medium in early CSS savvy browsers, and still is in quirks mode for some browsers. So, the absolute keywords are no good choice. Ems have cascade problems. The best solution for now seems to be to use percentages for the base font size, and go with ems for the rest - for accessibility and usability reasons.

Comments

1. February 11, 2004 08:16 PM

Quote this comment

Terrence Wood Posted…

From memory, IE/Mac 5 on OS 9 defaults to 96 dpi, and the font size can be increased or decreased via the keyboard. So for OS 9 users the only browsers that may have issues are NN4, IE4, and any of those other browsers I am sure nobody uses.

The best method for consistent cross platform font sizing I have found is to set the body to 75% (96dpi*0.75=72dpi and 16px*0.75=12px), and using ems for everything else.

The only cascade issue I'm aware of is IE/PC 5 with a HTML 4 transition doctype not cascading the font size through tables properly.

I fix this with:
* html th, * html td{ // deliver rule to IE only
font-size: 75%; // for IE5
fon\t-size: inherit; //for IE6
}

2. February 12, 2004 06:31 AM

Quote this comment

Patrick Griffiths Posted…

Ems are definitely the way to go in defining font sizes. They don't really have any cascading 'problems', they just work differently than pixels as you have to think about the font size of parent elements.

There's quite a lot more justification for using ems from Owen Briggs and myself.

3. February 12, 2004 06:52 AM

Quote this comment

liorean Posted…

Terrence: I kinda count ie5m as a one of those "modern Mac browsers", in the same way I count the OS 9 compatible moz versions in the same category, and all OS X browsers. They have one problem, though: They retain the 96 DPI even though the system may be set to a higher DPI. So, these browsers actually introduce an accessibility problem on such systems.

4. February 12, 2004 11:04 AM

Quote this comment

blakems Posted…

Sometimes the only way to get the effect you want is to use pixels, like for a line or border. Also shouldn't we consider that pixels is the unit intended for the computers and we should try use that, keeping in mind what may come in the future.

5. February 12, 2004 03:06 PM

Quote this comment

ant Posted…

Don't forget the sizes of the 2 camps: Classic Mac users vs. Visually-challenged users. Almost everyone will join the second group at some point in their lives. It's already a very large group, much larger I'll bet than Classic Mac users. Maybe we should think of Classic Mac users like Netscape 4 users - give them access, but don't bend over backwards for them.

6. February 12, 2004 03:35 PM

Quote this comment

liorean Posted…

Ant: Yeah, that's the way I'm starting to think of them too. Especially since both moz versions up to 1.2.1 and ie5m override the system and use 96DPI.

blakems: I was talking about font sizes. Font size should not be relative to screen size or set for easy computing, they should be set for usability and accessibility. Relative sizes are best, but if you really want an absolute size, you are better off with points than pixels. For sizing and positioning, though, screen, viewport or document relative sizes may be better, but that does also depend on purpose.

7. February 13, 2004 08:38 PM

Quote this comment

Tim Connor Posted…

Patrick, ems can have "cascading problems" dealing with dynamic content and CMS, depending on the layout. With manually generated content, or sufficient caution, you're right.

I built a CMS'ed site using entirely ems once that was a nightmare.

8. February 17, 2004 06:14 AM

Quote this comment

Richard Rutter Posted…

The 'cascading problems' with ems mentioned here and elsewhere are not problems (as in bugs or limitations) as such; they are just difficulties. With a little practice these can be easily overcome.

The main issue encountered is what I call 'inherited shrinkage' and is all to do with the 'cascading' bit of CSS. For example, one may wish to display list items and paragraphs the same size using a rule such as:

LI, P {font-size:0.75em}

This will work fine until your mark-up places a paragraph inside a list item, in which case the paragraph will be displayed much too small (at 0.75×0.75 = 0.5625 ems). A similar problem would be encountered with nested lists.

A simple set of rules at the end of your style sheet can overcome this using a descendant selector to keep the text size the same as its parent:

LI P, LI LI {font-size:1em}

A very handy tool for debugging inherited shrinkage and other cascading text size difficulties is Pixy's List computed (cascaded) styles favelet which enables one to type in the name of a CSS property (such as font-size), move a cursor over the active document and see the cascaded elements and the computed value of the property for each.

9. February 21, 2004 05:48 PM

Quote this comment

Jim Dabell Posted…

Font size issues with ems usually go away once you realise what you are doing. The example given of <p> elements inside lists is a perfect example. You need to ask yourself why you are changing the font size. I find that it's almost always because it's inside a particular part of the page, rather than a specific element. So select that part of the page with a #navigation or #content selector rather than trying to modify each and every element within it. Font size is inherited, so you don't have to worry about the elements within that section of the page.

10. February 28, 2004 04:22 PM

Quote this comment

Bruce Posted…

Yes, pixels hurt accessibility, but points is not the satisfying answer always. If you build a dhtml popup menu with javascript, you will see that you should use pixels. Points make script code more complex and open for compatibility problems.

11. March 1, 2004 03:01 AM

Quote this comment

Edwin van Vliet Posted…

I think you got it wrong. It's a definition thing. 1pt is defined to be about 1/72". How do you know the size of the computer screen in inches? I think you can't know. Imagine a computer screen of say 800" diagonal. If you define the font to be 12pt, then your text will be about 1/6" high according to the definition. That's rather small.

Why not use a truly relative font size as em or percentages? They are quite perfect if you don't know the size of the medium. It's up to the user to set his screen font size to his own taste or needs. If you don't adjust the base font size too dramatically (keep it between 75% and 125%) the user should be able to read the page. If he uses insane settings, it's not up to a developer to try to fix that.

Note that the software settings of 72 and 96dpi are quite odd anyway, if you keep the definition in mind. The software does not know if I use a 15" or 20" screen, remember?

12. May 30, 2006 10:23 AM

Quote this comment

ronny Posted…

aadult cartoons
abeba teens
porn on the web
anime erotic on the web
nude gallerys on the web
sri lankan sex on the web
teen incest on the web
thumbs porn on the web
xxx streaming vouyer on the web
naked pictures on the web
xxx pics absolutely on the web
sex pics on the web
sexvideos on the web
free absolutley totally free on the web
pictures closeup vaginas on the web
free absolutly free lesbian sex on the web
free absolutly free live sexy saver on the web
free absolutly free naked women on the web
free absolutly free pics famous people nude on the web
free absolutly free pics girls giving on the web
free absolutly free pictures penis absolutly on the web
free absolutly free thumbnails fat on the web
free absolutly free xxx rated videos on the web
free absolutly freeporn absolutly on the web
free absoluty free !! only teens!! on the web
free absulutly free sex movies absulutly on the web
free accidental upskirt free movies clips on the web
free actors xxx photos largest zipped image nude gallery on the web
free actress sex clips samplevideo clips on the web
free actress xxxx nude posters indian on the web
free adalt comix adlut comix adult boob on the web
free adele stephens free movies adele on the web
free adult asainpussy free amature asain sex pics on the web
free adult cartoon free sample pics on the web
free adult comix free adult comix free strap on the web
free adult personals caricaturas porno on the web
free adult sex samplepics adult sex on the web
free adult tastyhotpussy pussy animatiodic on the web
free adultcartoons nude sexcartoons on the web
free adultfreesex adultgaysex adultpass on the web
free adultsex rape adultsex thumbnail galleries on the web
free africa clits amature hairy pussy on the web
free african bisexaul personals african hairy on the web
free africasex age play incest phonesex on the web
free age school sexe aged ladeis sex aged on the web
free aisan hardcore free aisan hardcore thumbs on the web
free aisian video free aisian anal pictures on the web
free amatuer free cumshot on the web
free amatures wives picyures amatures on the web
free american pornographic photos on the web
free ameteurs juicy black women ameteurs on the web
free amputee pictures nude amputee teens on the web
free anal free adult home viedo free adult sex viedo on the web
free analsex free previews fotos arabic sex fotos on the web
free angels free download move hentai ramna on the web
free animanga boobs gallery animated gigantic boobs on the web
free animated gif dildo flash on the web
free animated gifs free monster rape on the web
free anime mai shiranui dickgirl shiranui on the web
free anna fubuki asian akira fubuki on the web
free arbic babes arbic bikini arbic bitch on the web
free archives shannen doherty picture on the web
free artist erotic artistic nude photos on the web
free asian girl assholes assholes dripping cum on the web
free asiansex jpeg free full tities pictures sex tasty on the web
free audlt spanking gallerys on the web
free audult sex acts free pictures audult on the web
free australian women soccer team nude pictures on the web
free babes nude free cubin bikini babe on the web
free babysitters sex family hot women on the web
free bare cunt little girl daddy daddy on the web
free batgirl animated nude betty veronica on the web
free beautiful europian youngest girls photos naked on the web
free beauty jpg hony beauty hot tit indian on the web
free Best Incest Rape Sites Family on the web
free big hard cocks free video mpgs older women sucking cocks on the web
free bitchs pregnant black bitchs rich bitchs gallerys russian bitchs on the web
free bitchs pregnant black bitchs rich bitchs gallerys russian bitchs on the web
free black cocks white pussysporno house on the web
free black girls being cumed xxx on the web
free black monster cock little white sluts on the web
free black porn real playercarmen electra on the web
free black pornoraphy black pornostar on the web
free black pusssy black pusssy chinise women on the web
free black transexual porno black wemen porn on the web
free blackteens free pics blackwomen free pics on the web
free blonde sluts fucking big black cocks on the web
free blow jobs absolutly free pics video on the web
free blowjob queen nude cleberites on the web
free blowjobs cumshot black pussy on the web
free blue girl freedownload hentai bondage on the web
free bollywood actors actresses photoes bollywood actors on the web
free bollywood xxx wet sexy bollywood xxxx on the web
free bolywood xxx hardcore bombay hardcore on the web
free bootie freesamplepicsfree fake on the web
free boys free vids gay xxxx free on the web
free bras babes picture brasil babes on the web
free brasil porno caroon porno pictures on the web
free brasillian babes brazalian beach babes on the web
free brazillian babes hot sexy galleries on the web
free breasted housewives pics free on the web
free brittany spears pictures vagina on the web
free Brother Father Daughter lesbian archives porn european on the web
free Brother Father Daughterfree nude on the web
free calender naked singaporean celebrities on the web
free carnaval brasil porno caroon porno pictures on the web
free caroon pornography free nake porno on the web
free cartoon themes video cartoon adult on the web
free carttoons adult celeberty fakes adult on the web
free celebs absolutely free nude ladies on the web
free celiberty porn stars chat women on the web
free charge pornochatrooms pornorgraphic chat rooms on the web
free chat cartoonadult pictures on the web
free cheergirls nude upskirt mainmenu adult tasty on the web
free chicago sexyblackgirls completly on the web
free cites indira varma sample picture on the web
free clip sample videio clips quiktime video on the web
free clips black women porn free thumbnails on the web
free clips gay men stripping on the web
free clips real player free sex media on the web
free club free swingers club picture gallerys on the web
free cock sluts pigs black cock sluts sucken cock on the web
free cocks video sample clips free monster on the web
free cocksuckers little fuckers galery on the web
free cocksucking shower free video movies on the web
free college girls sexy beutiful indian girl sexy on the web
free comix adult cartoon comixx adult comix on the web
free creampie gangbang thumbnails on the web
free cum doughter dad doughter xxx on the web
free cum filth fuck cum sex suck xxx on the web
free cumbath photo gallerys free illegal pics on the web
free cumshot blow private geocities blowjob mpeg avi on the web
free cumshots mpeg hardcore adult tombraider on the web
free cumshots porn stories free interracial on the web
free d on the web
free dad poondaddy porn dad rapes his daughter on the web
free daughter fathersex daughter fuck father on the web
free Daughter ONLY teens naked on the web
free daughters father fuck stories on the web
free dawnload teen clip ddd breasted on the web
free dicks pussies nude on the web
free dicks sexy moms sucking their on the web
free dirty teens carmen electra dirty on the web
free dowload dick pussy thumbnail gallary on the web
free downlaods brittany rews movie downlaod on the web
free download german free adult galeries on the web
free download pam erson fucking tommy lee on the web
free download pamela erson porn movie on the web
free download pussypic download vidos pink on the web
free downloadlil kim sexi foto lingeri on the web
free downlode hidden spy cam dressing room on the web
free dragon pink free downloads anime henti on the web
free dragonball avi episodes download on the web
free dragonballz gay hentai free websites on the web
free drinking games gay boys fucking drinking twink cum on the web
free dtqsname dejanews dtqson on the web
free dtqsname dtqsname dtqsname dtqsname on the web
free dutch cocksuckers movie clip sex dutch grils on the web
free ebony girls big breasts freesite hardcore bigtits on the web
free ebony sluts absolutly free eroctic pictures on the web
free egyptian nacked teen egyptian on the web
free elementary schoolgirls nude on the web
free ellegal young girls engl girl engl sexgirl on the web
free erected teenboys eroctic teen pictures on the web
free erotic freeware tastyhotpussy teengirls on the web
free errotic stories indian errotica japan on the web
free erson tommy lee goo msresult on the web
free europe adult sex movies fetish on the web
free europeans illegal european rape videos on the web
free exgirlfriends nudes exgirlfriends on the web
free extream movies media player facesitting on the web
free fat ass ebony niggers geting fucked on the web
free fat old chineese women fucking big on the web
free fat sexgirls chi teenssex savannah on the web
free Father Daughter absoluty on the web
free Father Daughter ONLY teens on the web
free father facking doughter beautiful picture on the web
free female erotica philippina fhoto erotica cartoon on the web
free fifteen nude girls fifteen nudes on the web
free forced young asain rape pictures on the web
free fourteen year old brown pussy on the web
free free adult asain sex images free on the web
free free adult cartoon free pic on the web
free free adult sex pictuer adult sex on the web
free free aisan fucking free aisan gallery free on the web
free free aisian anal sex thumbnails on the web
free free archives free photos black on the web
free free asain hentai girl gallery on the web
free free asian xxxx thumbs free asiannude on the web
free free bad birthday boys boy on the web
free free beutifull nude black women free bib on the web
free free big hudge fat tits free black fat on the web
free free bkack men white girl gang bang on the web
free free black latian girls free black on the web
free free blacks fat blonds fuck pics on the web
free free clebs babes free clebs nude on the web
free free clips teen girls pissing on the web
free free download porno film mpegs hindi films on the web
free free erotic israeli teens erotic japanese on the web
free free fifteen year old girl nudist images beautiful on the web