7

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

user1739140
  • 111
  • 1
  • 3
  • 6
  • http://caniuse.com/#feat=ttf you can use ttf, but it need to be a **completely error free** one, and encoded unicode, so Wingdings is an example of a problem in Firefox. Also, load it like `http://www.xxx` with the `w`s to ensure. – Daniel Cheung Nov 02 '14 at 01:20

4 Answers4

5

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. ;)

Community
  • 1
  • 1
Daniel Cheung
  • 4,779
  • 1
  • 30
  • 63
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.

Community
  • 1
  • 1
Jens A. Koch
  • 39,862
  • 13
  • 113
  • 141
1

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.

foxygen
  • 1,368
  • 1
  • 11
  • 22
  • This option is not available since FF-32. Sleep calm: the developers always better know what their users really need. – Van Jone Feb 12 '15 at 15:47
1

Firefox does not support .ttf fonts but will accept .woff fonts. The case is same with Internet Explorer which accepts only .eot fonts. Try converting your .ttf to .woff or find .woff version for your font.

To Convert - > http://everythingfonts.com/ttf-to-woff

Gavin
  • 321
  • 2
  • 10