IMG-LOGO

CSS3 Embedding Web Fonts

andy - 17 Aug, 2013 3753 Views 0 Comment

There are couple ways on how to embedding web fonts to your site. One of the popular way is by using font hosting service. One of the example is using Google Fonts, they offer more than 500 fonts available to choose. You can check quickly on quick tutorial in css section on how to use google web fonts.

Right now, we will be more focusing on hosting the fonts file on your own hosting server. There are couple fonts extension types available. They are listed as below:

Fonts Format Browsers
Web Open Font Format (.woff) Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+, Opera 11+
TrueType (.tff) and IpenType (.otf) Chrome 4+, Firefox 3.5+, IE 9+, Opera 10+
Scalable Vector Graphics (.svg) Chrome 17+, iOS 3.2+, Android 3+, Safari 5+, Opera 11+
Embedded Open Type (.eot) IE 4+

WOFF, TTF and OTF are the most popular web fonts choice format to use.

How to use @font-face basic syntax

This is the basic syntax on how to use it.

	@font-face{
		font-family: 'My font name';
		src: url('fonts/fontName.woff') format('woff'),
		src: url('fonts/fontName.ttf') format('truetype'),
		src: url('fonts/fontName.svg') format('svg'),
		src: url('fonts/fontName.eot')
	}

	/** this  is how you use it ***/
	body{
		font-family: 'My font name';
	}

Comments

There are no comments available.

Write Comment
0 characters entered. Maximum characters allowed are 1000 characters.

Related Blogs

How to draw a circle in CSS?

In this article, we are going to learn how to draw a circle in CSS. Firstly what needs to do is to create a CSS class called circle.

Related Tutorials

Media Queries

Learn how to use media queries in CSS3 Media queries are simple conditions used to targetting different devices for tables phones or desktop computers As each device may have different view size media queries become so handy to use to ...

CSS3 Border Radius

With new CSS3 border radius style you can easily create rounded corners for an image or html tag object Back in old days when we want to create a rounded border around an image or object we usually create 4 ...

CSS3 Multiple Column

Learn how to use multiple column property in CSS3 To create multiple columns in CSS3 is now so handy you just need to include a css built in keyword column count to do the job for you No more table ...

CSS3 Opacity

Learn how to use opacity property in CSS3. So what is actually opacity? CSS3 Opacity defines a transparency level of an element. The property value of opacity is range from 0 to 1.

CSS3 Box Sizing

Learn how to use box sizing property in CSS3 As you know many browsers treat margin and padding differently When you combine with width or height of an element box you find out that the final dimension is completely different ...