Font size, pt, px, and em conversion table

Source: Internet
Author: User

Reprinted from: http://blog.sina.com.cn/s/blog_42cdca7d0100qcep.html

Pt (point, LB) is a physical length unit, which refers to 1 inch of 72 points.
Pixel (pixel) is a virtual length unit, which is the unit of the digital image length of a computer system. To convert px to a physical length, you must specify the precision DPI (Dots Per Inch, the number of pixels per inch. DPI is generally available for scanning and printing. In Windows, the default value is 96 dpi, and in Apple, the default value is 72 dpi.
Em is a unit of relative length. It initially refers to the width of M, so it is named em. It refers to a multiple of the character width. The usage is similar to the percentage, such as 0.8em, 1.2em, and 2em. Usually 1em = 16px.

Font size is a special unit in the Chinese font. It uses Chinese codes to indicate the specific pt, which is easy to remember and express.

The conversion formula of pt and px can be obtained according to the pt definition:

Pt = 1/72 (INCHES), px = 1/dpi (INCHES)

Therefore, pt = px * 72/dpi

Calculated based on 96 DPI in Windows, pt = px * 72/96 = px * 3/4

---------------------------------------

Initial 42pt 56px 3.5em
Junior 36pt 48px 3em
34pt 45px 2.75em
32pt 42px 2.55em
30pt 40px 2.45em
29pt 38px 2.35em
28pt 37px 2.3em
27pt 36px 2.25em
26pt 35px 2.2em
25pt 34px 2.125em
24pt 32px 2em
222pt 29px 1.8em
20pt 26px 1.6em
18pt 24px 1.5em
17pt 23px 1.45em
16pt 22px 1.4em 3
H3C 15pt 21px 1.3em
14.5pt 20px 1.25em
14pt 19px 1.2em
13.5pt 18px 1.125em
13pt 17px 1.05em
Small 4 12pt 16px 1em
11pt 15px 0.95em
10.5pt 14px 0.875em 5
10pt 13px 0.8em
5th 9pt 12px 0.75em
8pt 11px 0.7em
7.5pt 10px 0.625em 6
7pt 9px 0.55em
66.5pt 8px 0.5em
5.5pt 7px 0.4375em 7
5pt 6px 0.375em 8

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.