Search code examples
htmlcssfontsfont-face

Will CSS3 @font-face not work with copyrighted or certain fonts?


I am having an issue trying to get @font-face to render fonts here. I can't seem to get it to work with Segoe (the font on WP7). The code looks correct, and I am using the latest version of Safari. I know its a copyrighted font, and it is just being used for a personal project, but i cant seem to get it to work. Can anyone help or have any suggestions?

@font-face {
  font-family: segoe;
  src: url('../font/segoe.ttf');
  format: 'truetype';
}

p{
  font-family: segoe;
}
<p>testing to see if this font will render</p>

Solution

  • Try using " (double quotes) not ' (single quotes).

    @font-face {
      font-family: segoe;
      src: url("../font/segoe.ttf");
      format: "truetype";
    }
    
    p{
      font-family: segoe;
    }
    
    <p>testing to see if this font will render</p>