reduce font size by subsetting and using woff2 (https://www.fontsquirrel.com/tools/webfont-generator)

This commit is contained in:
simon lehericey 2020-10-11 22:49:02 +02:00
parent 3c0c829a29
commit 5f74584c6a
8 changed files with 9 additions and 6 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,20 +1,23 @@
@font-face {
font-family: "Muli";
src: asset-url("Muli-Regular.woff") format("woff");
src: asset-url("Muli-Regular.woff2") format("woff2"),
asset-url("Muli-Regular.woff") format("woff");
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: "Muli";
src: asset-url("Muli-Bold.woff") format("woff");
src: asset-url("Muli-Bold.woff2") format("woff2"),
asset-url("Muli-Bold.woff") format("woff");
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: "Muli";
src: asset-url("Muli-Italic.woff") format("woff");
src: asset-url("Muli-Italic.woff2") format("woff2"),
asset-url("Muli-Italic.woff") format("woff");
font-weight: normal;
font-style: italic;
}

View file

@ -16,9 +16,9 @@
- packs = ['application', 'track', administrateur_signed_in? ? 'track-admin' : nil].compact
= javascript_packs_with_chunks_tag *packs, defer: true
= preload_link_tag(asset_url("Muli-Regular.woff"))
= preload_link_tag(asset_url("Muli-Bold.woff"))
= preload_link_tag(asset_url("Muli-Italic.woff"))
= preload_link_tag(asset_url("Muli-Regular.woff2"))
= preload_link_tag(asset_url("Muli-Bold.woff2"))
= preload_link_tag(asset_url("Muli-Italic.woff2"))
= stylesheet_link_tag 'new_design/new_application', media: 'all'
= stylesheet_link_tag 'new_design/print', media: 'print'