سؤال

Many fonts on Font-Squirrel (Afta Sans, etc) and Google Fonts don't include bold "specimens" of a given font set. Chrome doesn't seem to be able to estimate bold weights as Firefox, Safari, and even IE do. I've looked at this for quite a while, doubting that chrome, of all browsers, wouldn't have this capability. This seems to be quite limiting for the available fonts we can use, am I wrong?

This also seems to add unnecessary file size to font files when an estimated bold look would do.

هل كانت مفيدة؟

المحلول

Afta Sans, at least as distributed via Font Squirrel, does not have a bold typeface at all. That’s why there are no specimens of Afta Sans as bold.

If you still request, via HTML or CSS, a bold typeface, most browsers will synthesize bold glyphs from regular typeface glyphs by algorithmically bolding them. This is not a requirement, just what browsers tend to do. The CSS Fonts Module Level 3 CR says, in describing font-weight: “Although the practice is not well-loved by typographers, bold faces are often synthesized by user agents for faces that lack actual bold faces. For the purposes of style matching, these faces must be treated as if they exist within the family. Authors can explicitly avoid this behavior by using the ‘font-synthesis’ property.”

If you mean that some browser version on some platform does not do synthetic bolding, then that’s a decision by the browser vendor. In theory you could use the font-synthesis property to explicitly request for synthesis, but in practice it hardly affects anything; the defined initial value of the property means that synthetic bolding is allowed and, besides, most browsers do not support this property at all.

But the current version (33) Chrome on Windows does synthetic bolding.

If you are referring to the quality of synthetic bolding, then that’s inevitably browser-dependent. The page Say No to Faux Bold says: “What your users see can be better or worse depending on their browser and the fonts you start with. Some browsers, like Firefox, smear their bolds more, making a mess of display type. Other browsers, such as Chrome, smear their bolds very little, so that the distinction between bold and normal can be lost. None of these faux faces come close to what you can get from a real font.”

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top