How to use custom font on codepen
-
Hello. I'm new to css and practice on codepen.
I want to use a printloaded from the Internet and put it on github, but somehow the print doesn't work.
Reference to the project: https://codepen.io/Oleg2805/pen/GqqyQZ/ or the sss I use.
@font-face{ font-family: GodOfWar; src: url(https://github.com/Oleg2805/Tribute/raw/master/GODOFWAR.TTF); } #text1{ text-align:center; font-size:1.5em; font-family: 'GodOfWar'; }
-
Based on information https://github.com/rgrove/rawgit/wiki/Frequently-Asked-Questions
github
issues headline filesContent-Type: text/plain
and the browser ignores that type.But you can use the service.
rawgit
that fixes it. For such url: https://cdn.rawgit.com/Oleg2805/Tribute/master/GODOFWAR.TTF , the print comes back with the headline.content-type:application/x-font-ttf
♪ He's got a fine print.