views:

383

answers:

2

Hi all,

I'm a bit struggling with the @font-face CSS option. After a lot of reading, trying, retrying I finally came across a website that makes you a ready-to-go package when you upload your font. It's running now but it seems the font doesn't get anti-aliased. While I see this happening at other websites, mine does not render the headings the way I want.

My CSS code:

@font-face {
font-family: 'YanoneKaffeesatzThin';
src: url('../fonts/yanonekaffeesatzthin-webfont.eot');
src: local('☺'), url('../fonts/yanonekaffeesatzthin-webfont.woff') format('woff'), url('../fonts/yanonekaffeesatzthin-webfont.ttf') format('truetype'), url('../fontsyanonekaffeesatzthin-webfont.svg#webfontyC5sm3N9') format('svg');
font-weight: normal;
font-style: normal;}

What is left to do to make this last, but anoying, issue go away?

I hope to hear from you! Thanks in advance for the effort you make to help me further!

Ben Fransen

+3  A: 

With CSS3, you can use the font-smooth property, although antialiasing will still be controlled by the system defaults. If you really need to force a clean antialiasing no matter what the OS is, you have to use sIRF which automatically replace the text with a Flash component.

Chman
Thanks for your answer, I'm trying it with sIFR now.
Ben Fransen
I can also recommend Cufón instead of sIFR, so that you don't need Flash to view the fonts (I'm thinking of all Flashblock users, and iPhone/iPad users, besides those who're just plain annoyed by Flash): http://cufon.shoqolate.com/generate/
Jonas
+1  A: 

Also see: http://www.elfboy.com/blog/text-shadow_anti-aliasing/

The gist is that adding text-shadow: 0 0 1px rgba(0,0,0,0.3); gives the appearance of anti-aliasing.

Thanks! +1 for you;)
Ben Fransen