@Font Face in CSS
@font-face
The @font-face rule allows custom fonts to be loaded into a webpage. With the help of this, we can add additional fonts to optimize our website experience. In the @font-face rule, we first have to declare the name and then point to the font file.
Syntax:-
Its syntax is:-
< style >
@font-face {
font-properties
}
< /style >
Further Explanation:-
Font descriptor | Description |
---|---|
font-family | Required. Defines the name of the font. |
src | Required. Defines the URL where the font should be downloaded from |
font-stretch | Optional. Defines how the font should be stretched. |
font-style | Optional. Defines how the font should be styled. |
font-weight | Optional. Defines the boldness of the font. |
unicode-range | Optional. Defines the range of unicode characters the font supports. |