Tuesday, February 4, 2020

What does the size of the font translate to exactly?


I have a 40 pixel font that I'm trying to translate into custom images. I'm trying to match the size of the image exactly, but I'm having some problems getting exactly the right size. Basically, what it comes down to is this. When a font says it is X pixels, what does this physically mean?



Answer



This is an excellent question, which has a rather unsatisfactory answer.


The size of type, whether specified in pixels, points (1/72") or millimetres, is the height of an em-square, an invisible box which is typically a bit larger than the distance from the tallest ascender to the lowest descender.


Given this is a somewhat arbitrary measure which



  • is dependent on the exact technical design of the font


  • can't be precisely measured from a printed or rasterized sample


it's not very meaningful or useful, other than as an approximation.


In your case, work out what size you need to specify in Photoshop to match the browser's rendering by experimentation. You should find this to be a constant ratio for any font, but I wouldn't expect this to be the case if you change browser or OS.


No comments:

Post a Comment

technique - How credible is wikipedia?

I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...