The text is correctly displayed in Chrome. I want it to display this way in all browsers. How can I do this?
I was able to fix this in Safari with -webkit-font-smoothing: antialiased;
Chrome:
Firefox:
h1 {
font-family: Georgia;
font-weight: normal;
font-size: 16pt;
color: #444444;
-webkit-font-smoothing: antialiased;
}
<h1>Hi, my name</h1>
And a JSFiddle: http://jsfiddle.net/jnxQ8/1/
There's some great information about this here: https://bugzilla.mozilla.org/show_bug.cgi?id=857142
Still experimenting but so far a minimally invasive solution, aimed only at FF is:
I have many sites with this issue & finally found a fix to firefox fonts being thicker than chrome.
You need this line next to your -webkit fix
-moz-osx-font-smoothing: grayscale;
Be sure the font is the same for all browsers. If it is the same font, then the problem has no solution using cross-browser CSS.
Because every browser has its own font rendering engine, they are all different. They can also differ in later versions, or across different OS's.
UPDATE: For those who do not understand the browser and OS font rendering differences, read this and this.
However, the difference is not even noticeable by most people, and users accept that. Forget pixel-perfect cross-browser design, unless you are:
UPDATE: I checked the example page. Tuning the kerning by text-rendering should help:
More references here:
font-smoothing
(as mentioned) and another part istext-rendering
. Tuning these properties may help as their default values are not the same across browsers.I don't think using "points" for font-size on a screen is a good idea. Try using px or em on font-size.
From W3C:
I collected and tested discussed solutions:
Windows10 Prof x64:
macOs X Serra v.10.12.6 Mac mini (Mid 2010):
Semi (still micro fat in Safari) solved fatty fonts:
Have no visual effect
Wrong visual effect:
do not forget to set !important when testing or be sure that your style is not overridden
Try
-webkit-font-smoothing: subpixel-antialiased;