views:

41

answers:

2

Hello ... I'm working on a website that requires font trials online, the fonts i got are all .otf ... is there anyway i can embed the fonts and get them working on all browsers ??? If not, what other alternatives i have ??

Thanks

+3  A: 

If your Font is a free Font, you could convert your Font using for example a onlinefontconverter, but .otf is a good type for using @font-face

@font-face {
font-family: GraublauWeb;
src: url("path-to-the-font-file/GraublauWeb.otf") format("opentype");
}

@font-face {
font-family: GraublauWeb;
font-weight: bold;
src: url("path-to-the-font-file/GraublauWebBold.otf") format("opentype");
}

checkout this link to see how it works.

because @font-face is not working in all browsers (IE),read "@font-face in IE: Making Web Fonts Work".

hope this helps

choise
Ah, you beat me to it!
kzh
It worked perfectly fine on almost all browsers ... The only browser that didn't work is FireFox Linux ... Any suggestion for that one ??
Naruto
A: 

From the Google Font Directory examples:

@font-face {
  font-family: 'Tangerine';
  font-style: normal;
  font-weight: normal;
  src: local('Tangerine'), url('http://example.com/tangerine.ttf') format('truetype');
}
body {
  font-family: 'Tangerine', serif;
  font-size: 48px;
}

This works cross browser with .ttf, I believe it may work with .otf. (Wikipedia says .otf is mostly backwards compatible with .ttf) If not, you can convert the .otf to .ttf

Here are some good sites:

kzh