Why Firefox rejects ttf fonts

I have ttf fonts from the Internet that are listed in the ftp client * list as windows ttf fonts. I work with embedded fonts in Firefox on the Mac OSX platform, and I get the following error in the web console:

[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 it because windows ttf is different? Or is the file damaged?

If so, is there a way to shield font files from the Internet for ease of use or converting ttf windows to a more universal file?

I do and convert the ttf file to eot files for the sake of Internet Explorer, but I mainly work with DOM browsers and Firefox to develop, develop and test on Mac OSX using a locally installed Apache server.

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

+6
source share
4 answers

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

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

See this for reference: Wingdings Font Family Does Not Work in Firefox and Opera

Also, download it as http://www.example.com/xxx with w so that there are no problems. Sometimes servers act strangely when you test on a site.

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

+4
source

Mark this one out.

Relevant text:

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

+1
source

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 is "Cry Uncial Italic - crvy2i.ttf". The other two font files are damaged.

I think you need to rebuild the font (using the ttf editor) or switch.


What can work also consists in working with converted fonts from this ttf.

You wrote that you have already transferred the font to "eot". Try also converting to "woff" and "svg".

Then add the urls in this order: "eot, woff, svg". The browser will use the first good one ( fooobar.com/questions/977595 / ... ). Just leave the damaged ttf.

+1
source

Firefox does not support .ttf fonts, but accepts .woff fonts. The case is similar to Internet Explorer, which accepts only .eot fonts. Try converting your .ttf to .woff or find the .woff version for your font.

Convert β†’ http://everythingfonts.com/ttf-to-woff

0
source

Source: https://habr.com/ru/post/977594/


All Articles