Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Letter spacing in different browsers [duplicate]

Tags:

browser

css

fonts

Possible Duplicate:
Font and line spacing in different browsers

I have to create a pixel-perfect html from a given design. It uses a custom font. I am checking it in Firefox and Chrome and see that in Chrome spacing between letter is larger than in Firefox. Though I need them to look identically. I tried to set letter-spacing to 0 and it didn't help. How can I workaround? What if I use Cufon (don't want to use it though)?

enter image description here

like image 419
Sergei Basharov Avatar asked Dec 28 '22 08:12

Sergei Basharov


1 Answers

You're never going to get pixel-perfect across every browser and platform. Even if the letter-spacing is the same (which is seems to be if you set it to 0), the slight differences in anti-aliasing can make the letters appear wider. There's nothing in the CSS spec that specifies how browser render those small details.

Workarounds would be Cufon (yech) and images (yech). Pixel-perfect and the web are simply not good friends.

like image 60
Nate B Avatar answered Jan 18 '23 03:01

Nate B