{"id":253584,"date":"2017-04-17T05:02:14","date_gmt":"2017-04-17T12:02:14","guid":{"rendered":"http:\/\/css-tricks.com\/?page_id=253584"},"modified":"2020-03-25T06:30:42","modified_gmt":"2020-03-25T13:30:42","slug":"font-display","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/almanac\/properties\/f\/font-display\/","title":{"rendered":"font-display"},"content":{"rendered":"\n

The font-display<\/code> property defines how font files are loaded and displayed by the browser. It is applied to the @font-face<\/code><\/a> rule which defines custom fonts in a stylesheet.<\/p>\n\n\n\n

@font-face {\n  font-family: 'MyWebFont'; \/* Define the custom font name *\/\n  src:  url('myfont.woff2') format('woff2'),\n        url('myfont.woff') format('woff'); \/* Define where the font can be downloaded *\/\n  font-display: fallback; \/* Define how the browser behaves during download *\/\n}<\/code><\/pre>\n\n\n\n\n\n\n

Values<\/h3>\n\n\n

The font-display<\/code> property accepts five values:<\/p>\n\n\n\n