I downloaded a TTF font called "Clunk" and I'm trying to apply it to some text.
Here is the code I'm using:
<html> <head> <style> @font-face { font-family: clunk; src: url('clunk.ttf'); } h1 { font-family: clunk; } </style> </head> <body> <h1 id="logo">Test</h1> </body> </html>
This does not work, and Chrome gives me two errors:
Failed to decode downloaded font: (path to the file) OTS parsing error: incorrect entrySelector for table directory
The following errors appear in Firefox:
downloadable font: bad search range (font-family: "clunk" style:normal weight:normal stretch:normal src index:0) source: (path to the file) test.html:4:12 downloadable font: incorrect entrySelector for table directory (font-family: "clunk" style:normal weight:normal stretch:normal src index:0) source: (path to the file) test.html:4:12 downloadable font: rejected by sanitizer (font-family: "clunk" style:normal weight:normal stretch:normal src index:0) source: (path to the file)
I searched for these errors, but this problem seems very wide, and it was hard to find minimal examples. What can cause an error in this simple situation?
css fonts css3 font-face webfonts
Picamander2
source share