Should the default values for font-weight and font-style be indicated when added to the typewrit family by @font-face?
-
Is there any advantage of the second option over the first? What's the difference? What option?
First option:
@font-face { /* Обычное начертание */ font-family: "Exo"; src: url("path/to/file.woff2") format("woff2"), url("path/to/file.woff") format("woff"); } @font-face { /* Курсивное начертание */ font-family: "Exo"; src: url("path/to/file.woff2") format("woff2"), url("path/to/file.woff") format("woff"); font-style: italic; } @font-face { /* Полужирное курсивное начертание */ font-family: "Exo"; src: url("path/to/file.woff2") format("woff2"), url("path/to/file.woff") format("woff"); font-weight: 700; font-style: italic; }
Second option:
@font-face { /* Обычное начертание */ font-family: "Exo"; src: url("path/to/file.woff2") format("woff2"), url("path/to/file.woff") format("woff"); font-weight: 400; font-style: normal; } @font-face { /* Курсивное начертание */ font-family: "Exo"; src: url("path/to/file.woff2") format("woff2"), url("path/to/file.woff") format("woff"); font-weight: 400; font-style: italic; } @font-face { /* Полужирное курсивное начертание */ font-family: "Exo"; src: url("path/to/file.woff2") format("woff2"), url("path/to/file.woff") format("woff"); font-weight: 700; font-style: italic; }
-
Better download.
ttf
♪https://www.fontsquirrel.com/tools/webfont-generator
or another generator, and work with the generated code.Detailed introduction of work on prints: https://developer.mozilla.org/ru/docs/Learn/CSS/Styling_text/Web_fonts