Reputation: 3
So, I have a .ttf font (plus others) that I'm using for a website, with the code formatted as follows:
@font-face {
font-family: DEP;
src: local("fonts/DEP/DEP.ttf") format("truetype");
src: local("fonts/DEP/DEP.woff") format("woff");
src: local("fonts/DEP/DEP.otf") format("opentype");
src: url(https://codehs.com/uploads/98892640bda8f3fe5654e3c6d20d5c8c) format("truetype");
}
My code is also on github if you want to investigate this further. Thanks!
Upvotes: 0
Views: 266
Reputation: 11293
local()
accepts locally installed fonts' system identifier, not path to file, see: https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face#specifying_local_font_alternatives
Upvotes: 1