如何在Mac上用CSS减少字体重量? [英] How to reduce font weight in Firefox on Mac with CSS?

查看:194
本文介绍了如何在Mac上用CSS减少字体重量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的问题:我使用font-face为我的网站的菜单,但在Mac上的Firefox显示太粗了
在PC上,一切都很好,字体是完美的大小,看起来像应该

Here's my problem: I'm using font-face for the menu of my website, but Firefox on Mac displays it too bold On a PC, everything works well, the font is perfectly sized and looks like it should

不幸的是,在Mac上,我有一个CSS黑客的Safari(这是工作),但我没有找到任何类似于Firefox。

Unfortunatly, on Mac, i have to had a CSS hack for Safari (which works), but I didn't find anything similiar in Firefox.

我试过了text-shadow hack,我尝试使用font-weight属性(几乎不做任何事情)。

I've tried the "text-shadow hack", i tried using the font-weight property (which pretty much doesn't do anything).

现在,一些代码!

@font-face {
    font-family: 'KnockoutHTF48FeatherweightRg';
    src: url('font/knockout-htf48-featherweight-webfont.eot');
    src: url('font/knockout-htf48-featherweight-webfont.eot?#iefix') format('embedded-opentype'),
         url('font/knockout-htf48-featherweight-webfont.woff') format('woff'),
         url('font/knockout-htf48-featherweight-webfont.ttf') format('truetype'),
         url('font/knockout-htf48-featherweight-webfont.svg#KnockoutHTF48FeatherweightRg')     format('svg');
    font-weight: normal;
    font-style: normal;

}

Safari:

body{
    ...
    -webkit-font-smoothing: antialiased;
}

如果Mac上的FF和右边的FF都是FF(好的版本)

Left if FF on Mac and right is FF on PC (the good version)

谢谢!

推荐答案

FireFox今天在他们的错误论坛上发布了一个解决方案。它是今天刚刚完成,所以不会使用一段时间,但我们应该把

FireFox posted a resolution to this today on their bug forum. It was just finalized today so won't be in use for a while, but we should all put

-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;

所有浏览器。最后!!男人,这使我的一天!这将在下一个FF版本中出现。

in our body tag to reset this for all browsers. FINALLY!! man, that made my day! This should come out in the next FF release.

在这里
https://bugzilla.mozilla.org/show_bug.cgi?id=857142

这篇关于如何在Mac上用CSS减少字体重量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆