Answer the question
In order to leave comments, you need to log in
How does @font-face work?
@font-face {
font-family: "Computer Modern";
src: url('/fonts/cmunbmr.ttf');
}
@font-face {
font-family: "Computer Modern";
src: url('/fonts/cmunbbx.ttf');
font-weight: bold;
}
@font-face {
font-family: "Computer Modern";
src: url('/fonts/cmunsi.ttf');
font-style: italic, oblique;
}
@font-face {
font-family: "Computer Modern";
src: url('/fonts/cmunbxo.ttf');
font-weight: bold;
font-style: italic, oblique;
}
Do I understand correctly that the font-weight, font-style properties are parameters or selectors that determine the choice of font by the browser? <p style="font-family: 'Computer Modern'; font-style: italic;">Текст</p>
then the font from the cmunsi.ttf file will be used, but in such a construction
cmunbxo.ttf will be used? <i><b>Текст</b></i>
Answer the question
In order to leave comments, you need to log in
@font-face essentially allows you to add a font to use.
True if the font is specified in the selector for the element, or its parent.
body {
font-family: 'Computer Modern';
}
.some-class {
font-family: 'Computer Modern';
font-style: italic;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question