pondělí 06. února 2012  Hledání

Blog Quatrocom.cz

Welcome to our blog which should serve like a knowledgebase for other people intersted in Webdesign, photoraphy, CMS, DotNetNuke etc. Blog is in english language only so please excuse a bad  grammar quality (english is not my main language). Do not hesitate to leave a comments or contact us with any query.

VII21

Written by:SuperUser Account
21.7.2010 20:26 RssIcon

Google starts new service to use non-standard fonts at websites. The Google Font Directory lets you browse all the fonts available via the Google Font API, you can preview fonts and subsequently use them on your website.  All fonts in the directory are available under an open source license and are served by Google servers.

Using this service the Google provide a tool to make website nicer without using some complicated font embedding and Flash replacement. Visit http://code.google.com/webfonts/ and select one of font you like. At details page you see font in many sizes and variants (regular, bold, italic etc.) as well as supported characters and symbols.

Google Font Directory

Next feature of Google Font Directory is ability preview font at own text, so you can test font before using in live website. During preview you can change font properties and below the pane where text is displayed get the code needed to embed the font on your web site.

Font previewer

How to use Google Fonts at your Website?
You can start using the Google Font API in just two steps:

1) Add a stylesheet link to request the desired web font(s):

http://fonts.googleapis.com/css?family=Font+Name">


2) Style an element with the requested web font, either in a stylesheet:  

CSS selector {
  font-family: 'Font Name', serif;
}


Advanced usage
Typically you'll need only one font for your website but to request multiple font families, separate the names with a pipe character (|).

For example, to request the fonts Tangerine, Inconsolata, and Droid Sans:

http://fonts.googleapis.com/css?family=Tangerine|Inconsolata|Droid+Sans


The Font API provides the regular version of the requested fonts by default. To request other styles or weights, append a colon (:) to the name of the font, followed by a list of styles or weights separated by commas (,).

For example: 

http://fonts.googleapis.com/css?family=Tangerine:bold,bolditalic|
Inconsolata:italic|Droid+Sans


I suggested to use font previewer to set-up font you like and next grab the code generated below the preview pane.


Your name:
Gravatar Preview
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Add Comment  Storno