Custom Font In Css. Once added to a stylesheet, the rule instructs the browser to download the font from. Suppose we downloaded the font Rockfont, then we will have two fonts.
For simplicity, this example uses only a truetype font file. Let's look at how to do it for your WordPress theme. Now that your Cascading Style Sheet and font files are uploaded to your server, you can start using your custom font in your CSS declarations to help improve the look of the HTML.
The @font-face CSS at-rule specifies a custom font with which to display text; the font can be loaded from either a remote server or a locally-installed font on @font-face cannot be declared within a CSS selector.
Generically, you can use a custom font using @font-face in your CSS.
Using custom fonts is a great way to add a unique look to your site. Using CSS for one or more pages. Web fonts allow Web designers to use fonts that are not installed on the user's computer.