0

I use Brackets code editor and in the live preview it works perfectly but once I upload it onto the actual site it defaults to Arial. I've put the font in the css folder but I just don't understand why it doesn't work on the live site.

Here is my code.

@font-face {
    font-family: BMgermar;
    src: url('http://example.com/css/BMgermar.TTF') format('truetype');
}

Thanks in advance.

rhino
  • 13,543
  • 9
  • 37
  • 39
  • 1
    If you have the font installed on your local machine, but the path is incorrect to the font file, it will appear to work locally. Verify the font path is correct by checking the console, then correct the path if needed – Scott Simpson Jul 08 '14 at 23:08

1 Answers1

0

You Most Upload The Font In five Formats To Work Perfectly like This Code

@font-face {
font-family: 'droidkufi';
src: url('../fonts/droidkufi/droidkufi-webfont.eot');
src: url('../fonts/droidkufi/droidkufi-webfont.eot?#iefix') format('embedded-opentype'),
     url('../fonts/droidkufi/droidkufi-webfont.woff') format('woff'),
     url('../fonts/droidkufi/droidkufi-webfont.ttf') format('truetype'),
     url('../fonts/droidkufi/droidkufi-webfont.svg#droid_arabic_kufiregular') format('svg');
font-weight: normal;
font-style: normal;

}

And The Font Formats is:

  1. eot
  2. woff
  3. ttf
  4. svg

OR You Can Simply Import The fonts form https://www.google.com/fonts

  • I see that google fonts is much easier, but for this specific website my client wants a bitmap/pixel font. Is there a way to upload fonts to google? – Olly Sholotan Jul 09 '14 at 02:30
  • Google Fonts does have some bitmap fonts. [VT323](https://www.google.com/fonts/specimen/VT323) and [Press Start](https://www.google.com/fonts/specimen/Press+Start+2P). There are also some safe web-embeddable fonts here: http://www.fontsquirrel.com/fonts/list/classification/pixel (the top two) – Aibrean Jul 09 '14 at 11:31