开发者

WebFont loaded from Google Font API looks awful in Firefox 3.6 on Windows only

开发者 https://www.devze.com 2023-02-24 06:20 出处:网络
For a site we\'re developing we\'ve been using Lato from Google\'s WebFonts API.It works perfectly in every brow开发者_运维技巧ser (even IE), except for one very important case: Firefox 3.6 on Windows

For a site we're developing we've been using Lato from Google's WebFonts API. It works perfectly in every brow开发者_运维技巧ser (even IE), except for one very important case: Firefox 3.6 on Windows XP (haven't tested in Win 7 yet). The font loads and is displayed, but the characters look awful, like antialiasing completely malfunctioned.

WebFont loaded from Google Font API looks awful in Firefox 3.6 on Windows only

My googling has found hits about problems with webfonts in FF4 due to a bug in the browser, but I can't find anything about 3.6. Is there something we can do to fix this?


The reason Google's font looks like that has to do with a setting in the font's GASP table. This table toggles 'grayscale' and 'gridfitting' for ranges of sizes. I looked at the font Google is sending to your site and for sizes 0-13 grayscale is turned on. 14-18 is set for gridfitting, which results in black and white rendering. Then 19+ is set for both grayscale and gridfitting. I bet if you changed the size of the text to 13px, it would suddenly turn antialiased.

As for Font Squirrel fonts, we set the GASP table to render grayscale+gridfitting for all sizes above 4px.


There seems to be a difference between Google webfonts and the same font downloaded from Font Squirrel, see this (unrelated...) question.

So I would try and use the version they have at Font Squirrel to see if that solves the problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消