HubsInfo Network
You're browsing our forum as a Guest meaning you can only see a portion of the forum in read-only mode. To view all forum nodes and be able to create threads/posts please register or log-in.
PHP MySQL Linux Material Design Web Hosting Online Games SimCity BuildIt Wrath x5 WoTLK server

Specify @font-display when defining custom fonts in your theme

0 Members and 1 Guest are viewing this topic.

hubsinfo

Specify @font-display when defining custom fonts in your theme
« on: December 23, 2021, 06:10:53 PM »
Specify @font-display when defining custom fonts in your theme

Leverage the font-display CSS feature to ensure text is user-visible while webfonts are loading.

Code: [Select]
@font-face {
  font-family: 'Roboto Mono', monospace;
  src: url(fonts/roboto-mono-v12-latin-regular.woff2) format('woff2'),
       url(fonts/roboto-mono-v12-latin-regular.woff) format('woff'),
       url(fonts/roboto-mono-v12-latin-regular.ttf) format('truetype');
  font-display: optional;
}

@font-face {
  font-family: 'Roboto Mono', monospace;
  src: url(fonts/roboto-mono-v12-latin-700italic.woff2) format('woff2'),
       url(fonts/roboto-mono-v12-latin-700italic.woff) format('woff'),
       url(fonts/roboto-mono-v12-latin-700italic.ttf) format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: optional;
}





--
 



Linux Ubuntu Guides Linux games - Lutris.net