Is there a trick to show Arial Black in Firefox?

拜拜、爱过 提交于 2019-11-30 11:33:05
reece

The problem (according to the bug) is that the Windows DirectWrite API that Firefox uses treats Arial Black as font-family: Arial; font-weight: bold; (comment #8), so according to comment #10 you need to use:

font-family: "Arial Black", Arial;
font-weight: 900;

Seems like the best solution right now is to use font-face to check if the font exists on the local machine. I guess this is better than uploading the font to Font Squirrel and generating a bunch of files to embed.

@font-face {

    font-family: 'arial-black';
    src: local('Arial Black');

}


#nav {

font-family:"Arial Black", arial-black, sans-serif;

}

It will call Arial Black like a normal web safe font and if that doesn't work (Firefox in this case), it will fallback for font-face to look for it in the local machine.

If anyone has a better method, please feel free to post it.

Arial Black is the 900 weight of the Arial family. So use Arial within your font-family for use in Firefox as shown below:

font-family:"Arial Black", Gadget, Arial, sans-serif;
font-weight: 900;

This is reported in bugzilla.mozilla.org

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