How to define the location of a font for download in CSS


The @font-face rule is used to define the location of a font for download, although this may run into implementation-specific limits.

Example

Let us see an example

<style>
   <!--
      @font-face {
         font-family: "Scarborough Light";
         src: url("http://www.font.site/s/scarbo-lt");
      }
      @font-face {
         font-family: Santiago;
         src: local ("Santiago"),
         url("http://www.font.site/s/santiago.tt")
         format("truetype");
         unicode-range: U+??,U+100-220;
         font-size: all;
         font-family: sans-serif;
      }
   -->
</style>

Updated on: 27-Jun-2020

59 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements