Answer the question
In order to leave comments, you need to log in
How to set up inheritance fonts when using font-display: swap?
Greetings.
The styles are written like this:
body{
font-family: 'ubuntu400',Arial,sans-serif;
...
}
@font-face {
font-family: "ubuntu400";
src: url("font/ubuntu400.eot");
src: url("font/ubuntu400.eot?#iefix") format("embedded-opentype"),
url("font/ubuntu400.woff2") format("woff2"),
url("font/ubuntu400.woff") format("woff"),
url("font/ubuntu400.ttf") format("truetype");
font-style: normal;
font-display: swap;
}
@font-face {
font-family: "ubuntu500";
src: url("font/ubuntu500.eot");
src: url("font/ubuntu500.eot?#iefix") format("embedded-opentype"),
url("font/ubuntu500.woff2") format("woff2"),
url("font/ubuntu500.woff") format("woff"),
url("font/ubuntu500.ttf") format("truetype");
font-display: swap;
}
font-family: ubuntu500
body
automatically? Do any elements for which I prescribe a specific font (ubuntu500) must also prescribe fallback fonts? If so, then there are about 40 places in my file where a specific font is specified for specific elements, and adding a set of fallback fonts to each entry is bloating the file from scratch. What are the options for this case:Answer the question
In order to leave comments, you need to log in
Везде, где указываете название шрифта, который будет применен, нужно прописывать запасной
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question