Can you detect if Cleartype is enabled on PC via javascript?

邮差的信 提交于 2019-12-20 12:31:04

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/4328558/can-you-detect-if-cleartype-is-enabled-on-pc-via-javascript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!