Question

Some @font-face fonts don't play nice with non-cleartype settings (gets really choppy on the edges)

Is there a way to detect this via javascript so that I can do a modernizr-style class addition to the body if cleartype is off so I can use this in my CSS

Was it helpful?

Solution

In IE 6+ you can check the screen.fontSmoothingEnabled property. Otherwise you need to use an html 5 canvas to check for this.

Details here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top