Manish
Manish

Reputation: 1972

Is there any way for pushing fonts into users system

Is there any method for using a font which is not installed in user system. Till now I knew that font styles are applied in this manner

.my-style{
    font-family:Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;
}

If the first font is not available in users system it falls back to use the second font type.

But I observed that Google uses this font style in Google+

body{
font: normal 13px Roboto,arial,sans-serif;
}

Roboto font is not installed in my PC. Despite of this the Roboto font is used through out Google+. I tried using the same font style on sample page but it did not work .

Upvotes: 1

Views: 116

Answers (2)

AnaMaria
AnaMaria

Reputation: 3621

You can use Webfonts. Google themselves have a wonderful collection of Webfonts...

Check out this wonderful example of using a Google Webfont

<html>
  <head>
    <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Tangerine">
    <style>
      body {
        font-family: 'Tangerine', serif;
        font-size: 48px;
      }
    </style>
  </head>
  <body>
    <div>Making the Web Beautiful!</div>
  </body>
</html>

Check out this fiddle which shows the working of 2 Google WebFonts. Tangerine & Roboto

Working Fiddle

Upvotes: 0

Rich Bradshaw
Rich Bradshaw

Reputation: 72975

This is called @font-face.

http://www.google.com/fonts/ is a good resource/tool for this.

In short, you include a link in your CSS to the fonts, the user downloads and uses them on the site.

They can't access them afterwards, they are only used to draw your website.

Upvotes: 1

Related Questions