Naruto
Naruto

Reputation: 6668

Using font in Web

Can anyone tell me how to unify the font I use in all browsers in different operating systems ??

Upvotes: 2

Views: 401

Answers (6)

Paul D. Waite
Paul D. Waite

Reputation: 98786

Take a look at the @font-face declaration in CSS.

There’s a good overview on A List Apart:

@font-face isn’t super-simple:

  • different browsers support different font formats (a bit like video in HTML5)
  • and slightly different syntaxes
  • and a lot of commercial fonts aren’t licensed for use on the web

However, there are services like Font Squirrel, TypeKit and others that help simplify it.

Upvotes: 1

talkingD0G
talkingD0G

Reputation: 413

The simple answer is to add this CSS:

body { font-family: Arial, Helvetica, sans-serif; }

That tells the browser to first look for Arial, then if that's not available use Helvetica (a MAC font that looks like Arial), and then if that's still not available to use a sans-serif font, meaning a non-footed font (Times New Roman is a footed font).

There are only a few cross-browser compatible fonts available now: http://www.ampsoft.net/webdesign-l/WindowsMacFonts.html

As posted earlier, the Google Font API is a good alternative as well.

Upvotes: 1

Jakub
Jakub

Reputation: 20475

If you want a Javascript solution, try: Typeface.js I have seen a couple web designers use this (for headers and small font areas, but not full page fonts, as this js has some limitations).

Give it a look, may fit your need. However users without JS enabled will not take advantage of it.

Upvotes: 0

Brunno Gomes
Brunno Gomes

Reputation: 153

There is also a similar service from Google:

Google Font API

For now it supports only a few fonts, but it is really simple to use.

Upvotes: 3

Jaison Justus
Jaison Justus

Reputation: 2793

to use different font you can use font squirrel service font squirrel link

in font squirrel go to @font-face kits or you have your own font to put go to @font-face generator and upload your font and generate your font pack

Upvotes: 1

Veera
Veera

Reputation: 33172

Modern browsers support downloading fonts which can be used in any web pages - More here: https://developer.mozilla.org/en/css/@font-face

Upvotes: 1

Related Questions