why is Firefox rejecting ttf fonts

11,374

Solution 1

http://caniuse.com/#feat=ttf

You can use ttf, but it needs to be a completely error free one, and encoded in Unicode, so Wingdings is an example of a problem in Firefox.

Please see this for reference: Wingdings font family does not seem to work on Firefox and Opera

Also, load it like http://www.example.com/xxx with the ws to ensure there isn't any problems. Sometimes servers act weird when you are testing on the site.

Here's a way of converting ttf to a whole set of universal fonts: http://www.fontsquirrel.com/tools/webfont-generator. Font Squirrel is a good choice. ;)

Solution 2

I downloaded the font from http://www.dafont.com/de/cry-uncial.font and checked it with http://www.fontsquirrel.com/tools/webfont-generator

The only file working is "Cry Uncial Italic - crvy2i.ttf". The other two font files are corrupt.

I guess, you need to rebuild the font (with a ttf editor) or switch.


What might work, too, is to work with converted fonts from that ttf.

You wrote, that you converted the font to "eot" already. Try to convert to "woff" and "svg", too.

Then add the urls in this order "eot, woff, svg". The browser would use the first good one (https://stackoverflow.com/a/21155626/1163786). Just leave the corrupt ttf out.

Solution 3

Check this out.

Relevant text:

You get this error if you run out of memory when loading the fontfile or if there is something wrong with the layout (contents) of the fontfile. This is a protection against bad or malicious font files. It is probably possible to disable the sanitizer by setting the pref gfx.downloadable_fonts.sanitize to false in about:config but then you are no longer protected. Use at your own risk. Do not blame Mozilla if you are infected with malware.

Share:
11,374
user1739140
Author by

user1739140

Updated on June 29, 2022

Comments

  • user1739140
    user1739140 almost 2 years

    I have ttf fonts from the web that are listed in ftp client* directory listing as windows ttf fonts. I am working with embedded fonts on Firefox on Mac OSX platform and I am getting the following web console error:

     [17:59:49.201] downloadable font: rejected by sanitizer (font-family: "Cryv2" style:normal weight:normal stretch:normal    src index:0) source: http://localhost/html5/css/fonts/new-fonts-ttf/CryUncial/Cryv2.ttf @ http://localhos/html5/css/embeddedFontDeclarations.css
    

    Is this because windows ttf is different? Or is the file corrupted?

    If so, is there a way of screening font files from the web for usability, or converting windows ttf to more universal file?

    I do and have converted ttf file to eot files for the sake of Internet Explorer, but I primarily work on DOM based browsers, and Firefox for dev, authoring and testing on Mac OSX environment using pre-installed Apache server locally.

    *ftp client is Fetch and text editor is BBedit. Firefox 12.0