If I am using an externally loaded font (e.g. “MyFont”) and it’s going to be used in multiple classes, do I need to do this:
.one { font-family: MyFont; src: url( "fonts/MyFont.ttf" ); }
.two { font-family: MyFont; src: url( "fonts/MyFont.ttf" ); }
or can I do this?
.one { font-family: MyFont; src: url( "fonts/MyFont.ttf" ); }
.two { font-family: MyFont; }
No, check out this article: The New Bulletproof @Font-Face Syntax
Add something like this at the beginning of your CSS file:
Running with this sample code, the rest of your CSS should look something like: