{"id":318556,"date":"2020-08-05T16:16:26","date_gmt":"2020-08-05T23:16:26","guid":{"rendered":"https:\/\/css-tricks.com\/?page_id=318556"},"modified":"2020-09-01T08:18:11","modified_gmt":"2020-09-01T15:18:11","slug":"font-synthesis","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/almanac\/properties\/f\/font-synthesis\/","title":{"rendered":"font-synthesis"},"content":{"rendered":"\n

The font-systhesis<\/code> property in CSS gives the browser instructions for how to handle font bolded and italicized character when the specified font-family<\/code> doesn’t include them.<\/p>\n\n\n\n\n\n\n\n

Let’s take Lato<\/a> from Google Fonts as an example. It says there are 10 different variations of the font.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Each one of those font variations is technically a different font file. If we want to use certain weights and styles, then we’d link those files up so the browser has something to load.<\/p>\n\n\n\n

\"\"
This sentence would normally require four different font files.<\/figcaption><\/figure>\n\n\n\n

But, not all fonts include files for handling weight and style. In those cases, the browser will “synthesize” the appearance itself. The browser does the best it can, but faux bolding and style sometimes makes text less legible; that is, less legible than a truly designed version. In the mildest of cases, we may see characters overlap. In more severe cases, the text is completely unreadable or might even change the meaning \u2014 as could happen with languages like Chinese, Japanese, Korean and other logographic scripts.<\/p>\n\n\n\n

That’s where font-synthesis<\/code> comes in. It controls which typefaces the browser is allowed to synthesize.<\/p>\n\n\n

Syntax<\/h3>\n\n\n
.element {\n  font-synthesis: none | [ weight || style ];\n}<\/code><\/pre>\n\n\n\n

In plain English, this means font-synthesis<\/code> will accept:<\/p>\n\n\n\n