Font embedding with css

Hello All,

In past years, web designers have to use one of the “web-safe” fonts.
we can now embed other font by using regular CSS styles.
with the “@font-face” selector you have the possibility to import a font in a webpage.

Example
Specify font name as “myCustomFont” and specify the URL where it can be found

@font-face {
font-family: 'myCustomFont';
src: url('myCustomFont.ttf');
src: url('myCustomFont.eot')
}

Note:
The @font-face rule is supported in Internet Explorer 9, Firefox, Opera, Chrome, and Safari.

  • Internet Explorer 9 only supports .eot type fonts
  • Firefox, Chrome, Safari, and Opera support .ttf and .otf type fonts

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>