Pt, px, DPI: on the length of the unit misunderstood
Welcome to the CSS software tutorial area天æž
In the print layout, the "point" is an absolute units, equivalent to 1 / 72 inches, can be used yardstick DD, physics inches. However, in the meaning of CSS in pt not the case, for example, we specify a font is 9 pt, we would think that in accordance with the norms CSS, which means:
9 * 1 / 72 = 1 / 8 inch
This is a misunderstanding, because our monitors to be divided one by one pixel, there is only a single pixel color (To simplify, not here to discuss the pixel antialiasing technology), to appear on screen, they must first pt for the units to switch to the length of the units to pixels on the length of the conversion of the media, is DPI (in fact, the so-called DPI here is the operating system and browser to use the terminology, which is PPI, pixels per inch, and scanners, printers, digital cameras in the DPI is different concepts).
For example, no matter in which the operating system, the Firefox browser, the default is 96 DPI, in fact 9 pt = 9 * 1 / 72 * 96 = 12px.
Therefore, although the "DPI" the "I" and "1 pt equal to 1 / 72 inch," the "inch", which does not mean that the physics-inch, but the two units are equivalent to each other, will multiply in the About off.
So, how real physical length calculation? Please take a yardstick to measure the visibility of your display width (I have here is 11.2992 inches), divided by the horizontal resolution (I have here is 1024 pixels), each is received The physical pixel length.
Now we can answer such a question, page 9 pt font width is occupying more space? The answer is:
9 * 1 / 72 * 96 * 11.2992 / 1024 = 0.1324 inches = 0.3363 cm.
Interested friends can verify what their own.
Tags: Length Units






Leave a Reply