1

I have a TTF (True Type Font) which I have used correctly, as it shows up in Safari and Chrome. Is there a way to enable third party fonts on Firefox, or a MAC friendly file extension which is universal across all internet browsers?

I read up about it, and people suggested WOFF files, but they are an executable file on MAC, and Font Book wont open these files. I'm not particularly interested in downloading a third party program to install this third party font.

(In case you are wondering, or it helps, the font is "Top Secret". It's like an ARMY font)

Sreetam Das
  • 3,226
  • 2
  • 22
  • 36
  • Reading suggestions: [this answer](https://stackoverflow.com/a/43964026/6730571), replace "woff2" with "ttf", and [this question](https://stackoverflow.com/questions/38953194/missing-content-type-header-font-face-with-otf). How is your website hosted? Do you have access to the web server configuration? – Hugues M. Jun 06 '17 at 08:19
  • @HuguesMoreau My website isn't hosted. It is located on a local drive (my MAC). The file extension for my font already is TTF. WOFF files don't run on Macintosh operating systems. –  Jun 06 '17 at 22:52

3 Answers3

1

Rather important note: "files" are not "websites". Browsers do not treat file:/// resources the same as actual websites (which use http:// or https://), and will block all kinds of resource loading that websites should be allowed to do, but would open you up to all kinds of exploits if "files on your harddisk" were allowed to do.

So ,if you want to load your "website" as an actual website, load it with a server. You have a mac, so go to the directory with your index.html in the terminal and run:

python -m SimpleHTTPServer

This assumes you have python 2.7, which every mac has, but maybe you have python3 installed and you want to use that. If so, you need to use this instead:

python3 -m http.server

Presto, you can now access http://localhost:8000 and see your file as interpreted as a website, instead of "as a fie".

Mike 'Pomax' Kamermans
  • 49,297
  • 16
  • 112
  • 153
  • This will serve woff font files as `"application/octet-stream"`, but Firefox seems to accept that (tested with a sample page using fontawesome). +1 – Hugues M. Jun 12 '17 at 14:06
0

EOT font files worked well for me, here is a detailed article

Hope that helps!

neophytte
  • 648
  • 2
  • 11
  • 25
  • EOT are a purely Internet Explorer technology, and only for IE8 and below, which were discontinued by Microsoft in January of 2016. No modern website should use, or be told to use, EOT files. https://stackoverflow.com/questions/37086562/what-kind-of-font-files-do-i-need-for-modern-browsers-android-and-ios – Mike 'Pomax' Kamermans Jun 06 '17 at 23:23
0

You clarified in a comment that you open your web page from local disk (so, with "file://" URL).

Firefox does not support loading web fonts from local disk, by design.

It will work when moved to server and if that server has the proper configuration to serve appropriate content-type header for font files, as explained here (please note I did not suggest to use woff, I'm just saying it's the same problem for woff and ttf), here and here.

Hugues M.
  • 19,846
  • 6
  • 37
  • 65