Photoshop px vs OS px

When converting a web design presented as a photoshop file to html + css, I got confused about the font sizes. As you can see in the image below, 30 pixels in Photoshop are not equal to 30 px in other Windows programs (different on Mac or others?) Or in browsers. This does not seem to be affected by creating a Photoshop image in different resolutions than 72, which is the default, and does not change when the units change between pt and px. Can anyone hint how to set up Photoshop to use browser blocks? alt text http://i40.tinypic.com/24y8lra.jpg

+4
source share
2 answers

The font size in the paint document refers to dots, not pixels. Change the font size in Photoshop to 30pt and they should be the same size.

The dot is 1/72 of an inch, and the pixel equivalent may depend on the DPI of your monitor. At 96 DPI, 30pt * 1in / 72pt * 96DPI (my res screen) is 40 pixels. To convert pixels to points, work backwards, so 30px * 1in / 96px * 72pt / 1in = 22.5pt.

So, change the layout text size to 22.5 and they should match.

+6
source

Set the value to 96 dpi.

+1
source

Source: https://habr.com/ru/post/1286305/


All Articles