Webfont Smoothing and Antialiasing in Firefox and Opera

后端 未结 8 633
旧巷少年郎
旧巷少年郎 2020-11-28 18:26

I have custom-made web fonts used on my site. To style my rendering output, I used the following code:

//-webkit-text         


        
8条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-28 18:39

    As Opera is powered by Blink since Version 15.0 -webkit-font-smoothing: antialiased does also work on Opera.

    Firefox has finally added a property to enable grayscaled antialiasing. After a long discussion it will be available in Version 25 with another syntax, which points out that this property only works on OS X.

    -moz-osx-font-smoothing: grayscale;
    

    This should fix blurry icon fonts or light text on dark backgrounds.

    .font-smoothing {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    

    You may read my post about font rendering on OSX which includes a Sass mixin to handle both properties.

提交回复
热议问题