Skip to content

Commit

Permalink
Remove tff fonts & Temporarily show system font while loading fonts
Browse files Browse the repository at this point in the history
tff fonts IMO can be removed since woff and woff2 are supported by all modern browsers (in fact, woff support was added to Firefox in 2010).

Temporarily show system font while loading fonts (even though we talk about icons here). Recommendation from Chrome Lighthouse audit, see https://developer.chrome.com/docs/lighthouse/performance/font-display/?utm_source=lighthouse&utm_medium=devtools#how-to-avoid-showing-invisible-text.

Signed-off-by: Florian Hotze <[email protected]>
  • Loading branch information
florian-h05 committed Mar 1, 2023
1 parent a02f4eb commit 1732369
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bundles/org.openhab.ui/web/src/css/icons.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
src: local('Material Icons'),
local('MaterialIcons-Regular'),
url(../fonts/MaterialIcons-Regular.woff2) format('woff2'),
url(../fonts/MaterialIcons-Regular.woff) format('woff'),
url(../fonts/MaterialIcons-Regular.ttf) format('truetype');
url(../fonts/MaterialIcons-Regular.woff) format('woff');
font-display: swap;
}
.material-icons {
font-family: 'Material Icons';
Expand All @@ -32,9 +32,9 @@
font-family: 'Framework7 Icons';
font-style: normal;
font-weight: 400;
src: url("../fonts/Framework7Icons-Regular.woff2") format("woff2"),
url("../fonts/Framework7Icons-Regular.woff") format("woff"),
url("../fonts/Framework7Icons-Regular.ttf") format("truetype");
src: url(../fonts/Framework7Icons-Regular.woff2) format('woff2'),
url(../fonts/Framework7Icons-Regular.woff) format('woff');
font-display: swap;
}
.f7-icons {
font-family: 'Framework7 Icons';
Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit 1732369

Please sign in to comment.