📜 ⬆️ ⬇️

Another way to use exotic fonts on a webpage

image It often happens that a client wants “this pretty AAA typeface” on his website. Previously, it was in most cases unavailable until various libraries for working with non-standard fonts or the same @ font-face appeared .

There are also solutions like sIFR , cufon , and others, although they may not be so elegant compared to the proposed method. Holivarit that we will not be better.
Yes, and with @ font-face there may be problems with licenses for fonts and other things.

Even once most of the site builders used the pictures (and even now it is noticed). Sometimes in those days I had to give up pictures in favor of a fast site load (because then the Internet speed was not the same as it is now). But it is very difficult for the customer to explain why it is better not to use this or that “pretty” font. Yes, and this should not be in actual fact!
')
What is the best option?

In general, everyone solved (solves) the issues that have arisen with the introduction of non-standard fonts in their own way. Some people like them, while others, perhaps, often step on a rake.

Therefore it is worth considering (and reminding someone) of a wonderful service - Google Font API. Immediately I warn you: this is not a panacea, not a solution to all problems, but as an excellent alternative to all that we used before / use now.

Using the Google Font API, you can embed web fonts on any web page, as most other tools allow you to do this. What are the advantages?

Google Font API includes:

Minuses:

With a small amount - there is an opportunity to add your own font.

There is also a font viewer with which you can match the font and its characteristics, which is needed. And in addition to Chrome, a special extension is offered.

As already mentioned, using the API is very simple. Just add a line to the <head> ... </ head> section of the webpage, which will load the required CSS:



CSS :

h1 { font-family: 'Lobster', arial, serif; }


API? Google Font API ( <link>), Font API , . CSS.

IE, <link> <head>. IE, <script>, , - .

Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

, Google :

<html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


CSS :

h1 { font-family: 'Lobster', arial, serif; }


API? Google Font API ( <link>), Font API , . CSS.

IE, <link> <head>. IE, <script>, , - .

Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

, Google :

<html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  1. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  2. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  3. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  4. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  5. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  6. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  7. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  8. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  9. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  10. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  11. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  12. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  13. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  14. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  15. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  16. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  17. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  18. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  19. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  20. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  21. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  22. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  23. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  24. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  25. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  26. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  27. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  28. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  29. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  30. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  31. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  32. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


  33. CSS :

    h1 { font-family: 'Lobster', arial, serif; }


    API? Google Font API ( <link>), Font API , . CSS.

    IE, <link> <head>. IE, <script>, , - .

    Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

    , Google :

    <html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


CSS :

h1 { font-family: 'Lobster', arial, serif; }


API? Google Font API ( <link>), Font API , . CSS.

IE, <link> <head>. IE, <script>, , - .

Chrome, Opera, Safari Internet Explorer , , FireFox . Google , , FireFox.

, Google :

<html> <head> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" > </script> <script type= "text/javascript" > WebFont.load({ google: { families: [ 'Tangerine' , 'Cantarell' ] } }); </script> <style type= "text/css" > .wf-inactive p { font-family: serif } .wf-active p { font-family: 'Tangerine' , serif } .wf-inactive h1 { font-family: serif; font-size: 16px } .wf-active h1 { font-family: 'Cantarell' , serif; font-size: 16px } </style> </head> <body> <h1>This is using Cantarell</h1> <p>This is using Tangerine!</p> </body> </html> * This source code was highlighted with Source Code Highlighter .


For those interested, I recommend to go to the Google Font API to see the list of available fonts and read the documentation.

So, what is most optimal is always to choose you, I just brought my thoughts on this matter. Maybe someone decides that this is the best way, and someone will see how NOT to do. Yes, and cases of implementation are heterogeneous.
In any case, let it be your choice for the benefit of the work you are doing.

Source: https://habr.com/ru/post/111852/


All Articles