www.webdeveloper.com
Page 1 of 3 123 LastLast
Results 1 to 15 of 41

Thread: What is actually correct if using pt, px, em?

  1. #1
    Join Date
    Sep 2005
    Posts
    1,630

    Question What is actually correct if using pt, px, em?

    What is actually correct if using pt, px, em and compliant with resulution in new up-to-date browsers?

  2. #2
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    1. The pixel (px) (picture element) is a relative measurement unit. It is rather a logical unit, it depends on the screen resolution and on the dot size (DPI = dots/inch). It can be understood as the dot pitch of the display.

    2. The point (pt) is a physical unit of measurement, corresponding to one-seventy-second of an inch (thus 12 points to a pica, and 6 picas to an inch).

    3. The em is a property of the TrueType fonts. 1 em is the font-size of a TrueType font irrespective of whether it’s specified in points or pixels. If the size of the font is not specified, usually the modern browsers set the default font size to about 16px (some calculation gives the value of 16.4), thus by default we may say approximately 1em=16px.

    The physical units (point, pica, inch, millimeter, centimeter...) are to be used only for for print design. In screen design (web design) the absolute units are to be avoided because with the various monitor sizes, resolutions, and so on, any ratio of pixels-to-inches is possible. Usually, in the common 72 ppi (points per inch), 1pt=1px, but for some Windows machines, the browser's presumption is for 96 ppi or even 120ppi, thus the dimension set in points might look different in different browsers on different resolutions for different OS.

    Now, between px and em, most of the time pixels are preferred. With one exception: the fonts. In IE/Win the pixel sized elements can not be resized by the user. For a full accessibility it would be a good habbit to set the font size in em or % . The rest of the document elements should be sized in pixels.
    Last edited by Kor; 12-15-2008 at 06:59 AM.

  3. #3
    Join Date
    Sep 2005
    Posts
    1,630
    Thank you

    What do you mean ,,The rest of the document elements'' should be sized in pixels?
    Last edited by toplisek; 12-15-2008 at 06:56 AM.

  4. #4
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    Quote Originally Posted by toplisek View Post
    Thank you

    What do you mean ,,The rest of the document elements'' should be sized in pixels?
    images, divs, tables, inputs, margins, padding... everything on a web page which needs to have a certain dimension should be sized in pixels. Only the fonts should be sized in em or % in order to let the user to change the font-size at will.

  5. #5
    Join Date
    Sep 2005
    Posts
    1,630
    ok, thanks

  6. #6
    Join Date
    Sep 2005
    Posts
    1,630

    Question

    I have two issues in this case:
    1. what is normal font to print on printed media and use font in pt?
    2. should be controled in pt not only fonts but other values like width, height, padding?

  7. #7
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    1. what do you mean by "normal font"? I am not quite a specialist in printing issues.
    2. No. As I said: If about web pages, no "pt" nor other physical measurements are to be used. "em" or "%" for fonts, "px" for anything else.
    Last edited by Kor; 01-06-2009 at 06:59 AM.

  8. #8
    Join Date
    Sep 2005
    Posts
    1,630

    Question

    thank you.

    It seems that 12pt is not the same as 12 fonts size in WORD document.

    Normally Outlook gives values 11 or maybe 12.

    How I know which value is 12pt?

    you have exampl ein WORD software like:
    time New Roman...12, 11. which measure is this compared to pt?

  9. #9
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    There is no such thing as a standard font. It does turn out that on a screen sans-serif fonts are easier to read but on print serif, especially at smaller sizes. Times New Roman for serif and Arial for sans have become ubiquitous but I hate both, especially Arial. And then you have to take into account that some fonts are well suited for the body of the text and some are titling fonts. Some of the titling fonts don't even contain lower case glyphs. Take another ubiquitous font, the dread font Papayrus. In the body of the text it's actually quite elegant. The strokes have little notches in them that give the text a subliminal patina at smaller sizes. But everybody uses the thing large for titles and I tend to think that the effect is quite awful.

    And then you have to take into account the little issue of font availability and font substitution. Unless they are printing from a PDF with the fonts embedded you cannot know with what fonts the page will actually be printed. And different fonts will cause the page to flow differently.

    You can use any unit of measure except pixels. Printers think in terms of points but they know how to convert from inches and centimeters. But if you really want to add half an EX letter spacing then go ahead and use EXs. The size of an EX will differ from font to font. What drives me nuts is that sometimes I like to add a point or two of letter spacing but only with certain fonts--but I can't know just what font is going to be used.
    Last edited by Charles; 01-06-2009 at 06:14 AM.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  10. #10
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Quote Originally Posted by toplisek View Post
    It seems that 12pt is not the same as 12 fonts size in WORD document.
    Are you comparing on the screen or on the page?

    Do keep in mind that Microsoft gets everything just a little bit wrong. It kind of like those WWII tortures where they would put somebody in a room that's just a little out of whack.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  11. #11
    Join Date
    Sep 2005
    Posts
    1,630
    So, 12pt is not the same as 12 in WORD document? I mean printed WORD document.

  12. #12
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    You must know that what you see on your monitor is not always what you will get on your printer machine. But what measurent says the application it is, that it might be . Just give it a test. I suppose that the most trusty OS for printing issues is the Mac (so they say). Even so, keep in mind that if you measure something on your screen it might not be what you will measure on your printed paper. You must think everything in a "proportional way", if I may say so.
    Last edited by Kor; 01-06-2009 at 06:27 AM.

  13. #13
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Quote Originally Posted by toplisek View Post
    So, 12pt is not the same as 12 in WORD document?
    To put it bluntly, I neither know nor care what is going on with MS Word.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  14. #14
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Quote Originally Posted by Kor View Post
    You must know that what you see on your monitor is not always what you will get on your printer machine. But what measurent says the application it is, that it might be . Just give it a test. I suppose that the most trusty OS for printing issues is the Mac (so they say). Even so, keep in mind that if you measure something on your screen it might not be what you will measure on your printed paper. You must think everything in a "proportional way", if I may say so.
    The problem is that applications typically don't know what the screen resolution is, they don't know how many pixels to the inch. So they just guess.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  15. #15
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    Quote Originally Posted by Charles View Post
    To put it bluntly, I neither know nor care what is going on with MS Word.
    Oh, c'mon. You might not care about MS, but you should care about the toplisek's problem, shouldn't you?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles