Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does @font-face work in all browsers?

Does @font-face work in all browsers ?

How can i use @font-face?

like image 602
faressoft Avatar asked Oct 30 '10 19:10

faressoft


People also ask

Do browsers support all fonts?

All major browsers support WOFF/WOFF2 (Web Open Font Format versions 1 and 2). Even older browsers such as IE9 (released in 2011) support the WOFF format. WOFF2 supports the entirety of the TrueType and OpenType specifications, including variable fonts, chromatic fonts, and font collections.

Does OTF work on all browsers?

Web Open Font Format (WOFF) WOFF is basically OTF or TTF with metadata and compression supported by all major browsers.

Why do fonts look different in browsers?

A lot of the differences are more to do with the fact browsers add or omit different default weights / styles to fonts. To stop this happening make sure in your CSS you have font-weight: normal and font-style: normal in your @fontface code block. You then need to apply the necessary styles to the HTML elements.

Is font face deprecated?

What does <font face=""> do? Was used to specify a typeface. Deprecated. Use CSS instead.


2 Answers

Check out: @font-face browser support

Webkit/Safari

  • since version 3.1
  • font formats:
    • TrueType/OpenType TT (.ttf)
    • OpenType PS (.otf)
    • SafariMobile (iPhone/iPad): only SVG Fonts
  • More info: http://webkit.org/blog/124/downloadable-fonts/
  • Wiki: Code samples

Opera

  • since Opera 10: http://www.opera.com/browser/ and Opera Mobile 9.7
  • font formats:
    • TrueType/OpenType TT (.ttf)
    • OpenType PS (.otf)
    • SVG (.svg)
  • More info: http://dev.opera.com/articles/view/seven-web-fonts-showcases/

Internet Explorer

  • since IE 4
  • font formats:
    • Embedded OpenType (EOT) created by Microsoft's WEFT tool
    • WOFF since IE9
  • More info: http://www.microsoft.com/typography/web/embedding/default.aspx
  • Wiki: Code samples

Mozilla/Firefox

  • since Firefox 3.5
  • font formats
    • TrueType/OpenType TT (.ttf)
    • OpenType PS (.otf)
    • WOFF (since Firefox 3.6)
  • Wiki: Code samples

Google Chrome

  • In Chrome 4.0 stable release. As of January 25th, 2010
  • In Chrome 3.0, you could run the executable with a command line switch of: --enable-remote-fonts 1
  • It was disabled by default for security review: 2 [3], [4]
  • More details on chrome and @font-face here
  • font formats
    • TrueType/OpenType TT (.ttf)
    • OpenType PS (.otf)
    • WOFF since version 6

Netscape

  • since version 4, discontinued since Netscape Navigator 6
  • font formats:
    • Portable Font Resource (.pfr)
  • more info: http://en.wikipedia.org/wiki/TrueDoc

As for usage, check this out:

  • The Potential of Web Typography:
like image 108
Sarfraz Avatar answered Sep 22 '22 03:09

Sarfraz


Not all browsers but all of the big ones (Chrome, IE, FireFox, Opera, Safari). Sarfraz's post shows which it will work with.

Here's an example of how to use it:

@font-face {
font-family: DeliciousRoman;
src: url(/Delicious-Roman.otf);
}
like image 21
Blake Avatar answered Sep 24 '22 03:09

Blake