Source: Conversion of pixels to font size
In the interface, often need to accurately calculate the coordinates and font size, and the font is generally used in points, but in the production, if you want to put the font on the picture, and maintain the corresponding size, you need to convert. Calculated: 1 lb =1/72 inches, which is a unit value 1.3 pixels = 1 lb (h) 96 pixels = 1 inches Here can use three values, it is convenient to calculate the for example: 9 (LB) word is 9x1.3= pixel value font size pound millimeter number 42 14.82 Junior 36 12.70 one 26 9.17 small one 24 8.47 second, 22 7.76, Xiao er No. Third 18 6.35 16 5.64 Small three 15 5.29 No. fourth 14 4.94 Small Four 12 No. Fifth 4.32 10.5 3.70 Small Five 9 3.18 no. sixth 7.5 2.65 Small six 6.5 2.29 No. seventh 5.5 1.94 an inch is equal to 25.4mm pixels and the approximate ratio of centimeters is: 40:11 cm 28 pixel pixels There are two concepts, One refers to the unit length, usually inches, the number of pixels, and the other is the total number of pixels on the photosensitive material, the size of pixels in different occasions and materials are different, so these two can not be directly and centimeter conversion. The pixel points per centimeter are different for different materials and occasions. You can imagine that the pixels are large, the dots per centimeter are less, and the other is more. Pixels are density units, centimeters are length units, and they cannot be compared. The units of pixels are "one" and the centimeter is the unit of length. A centimeter does not equal how many pixels, only one centimeter contains how many pixels.
Conversion of pixels to font size (go)