Google Chrome is not antialiasing my text even though I added code specific for Google Chrome to do so.
On a weird note, Firefox, which was said to be incompatible with the code I had added does antialias the text appropriately.
Here's the specific CSS styling:
.jumbotron h1 { color: white; font-size: 100px; text-align: center; line-height: 1; /* * Webkit only supported by Chrome and Safari. */ -webkit-font-smoothing: antialiased; }
Chrome:
Firefox:
As you can see above (and probably on the website) the font is much better looking on Firefox.
Go to Control Panel > Appearance and Personalization > Display > Adjust ClearType text (on the left). Check the box entitled “Turn on ClearType.” After going through a short wizard, this will fix some of the text rendering issues in Chrome. Enable "Disable accelerated 2D Canvas" in Chrome.
NOTE: Chrome 37 and later fixed font antialiasing, so this fix is no longer needed in the latest version fo Chrome.
I think the best solution is to convert your font to svg as chrome does render fonts with antialiasing if the font file format is svg.
You can get more info here in the article where I found the answer myself: http://www.adtrak.co.uk/blog/font-face-chrome-rendering/
So basically you must convert your font to svg format (using a font converter like font squirrel provides) and set media queries in your css so that the svg file format is specified first in your font declaration for chrome, but not for the other browsers.
/* This is the default font face used for all browsers. */ @font-face { font-family: 'chunk-webfont'; src: url('../../includes/fonts/chunk-webfont.eot'); src: url('../../includes/fonts/chunk-webfont.eot?#iefix') format('eot'), url('../../includes/fonts/chunk-webfont.woff') format('woff'), url('../../includes/fonts/chunk-webfont.ttf') format('truetype'), url('../../includes/fonts/chunk-webfont.svg') format('svg'); font-weight: normal; font-style: normal; } /* This font face inherits and overrides the previous font face, but only for chrome */ @media screen and (-webkit-min-device-pixel-ratio:0) { @font-face { font-family: 'chunk-webfont'; src: url('../../includes/fonts/chunk-webfont.svg') format('svg'); }
And voilà. The font works in Chrome with antialiasing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With