P
P
Pavel Kizernis2017-08-30 18:43:05
HTML
Pavel Kizernis, 2017-08-30 18:43:05

Why does Photoshop's font size not match the browser's font size?

Very often I received layouts (PSD) and if, say, I see a font size of 15pt there, then in the browser this will correspond to 15px.
But now I got a layout in which all font sizes are in pt, but if I really set 20px or 20pt in the layout, the text will be much larger than in the layout.
8c6d2736d6cc4180a7a99bc3d0efd3ca.png
This layout was at 72 pixel/inch. I converted it to 72 pixel / centimeter with the dimensions preserved, and now it looks more or less like if I type in pt.
3a33152040644632bfb7aec22adcf102.png
But I would like to understand this difference and what to say to the designer so that it would be like before? Or in general, how is it right?..
Below is an example of a 100x100px image created in Photoshop in different ways. The text in both images is written in 20pt Arial Regular font.
Pixel/inch:
99e3cde7c4c6469c9a3d783130530b34.png
Pixel/Centimeter:
b01d11352ee3452c9585ba14f470b947.png
As you can see, the size of the image itself is not affected, 72 Pixel/inch or 72 Pixel/Centimeter is specified, but it affects the size of the text.
If we try to add text to the pictures directly in the browser, we will get the following (the text between the pictures was added in the browser from the Chrome developer panel)
9bf9146317264c1aa26bc92f2cd9d000.png
: of the above example, we get:
in the file Pixel/Centimeter - 50.8px
in the file Pixel/inch - 20px
Which does not match the rendering in the browser.
90bd262ea3c04ef085448f84668d07f1.png

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
Pavel Kizernis, 2017-08-31
@pashakiz

Problem found where not looking
19325c05aa5b4db19859f80cf1bc4b94.png

S
Sergiu Mitu, 2017-08-30
@EaGames

2pH6CRlGRGCr8n4_Eo7GAg.png
Never had any problems or differences, implemented a single pixelperfect layout.

D
denverkurt, 2017-08-30
@denverkurt

xs. Personally, in my Photoshop, when switching units of measurement, the value remains the same. those. 20px = 20pt
which corresponds to 20px in css
never had a problem

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question