In this post I am going to show you how to use custom browser support dynamic font in the website. Here we Use Truetype and OpenType to display the fonts you want to display on your Web pages. We can acheive this by using font-face property of the css3.
Below is the syntax for the css3 @font-face property:
@font-face {
font-family: fontname;
src: url(“fontname.eot“); /* EOT file for IE */
}
@font-face {
font-family: fontname;
src: url(“fontname.ttf“); /* TTF file for CSS3 browsers */
src: local(“fontname “), url( fontname.ttf ) format(“truetype“); /* non-IE */
}
Use:
body {
font-family: fontname, Verdana, Arial, sans-serif;
}
@font-face will allow the browser to download a font for rendering the page; a link is given to either a remote site or a folder on the local site which the browser will access, download, install and render, so the site can be viewed in the way the designer desired.
Using Microsoft’s free WEFT tool (or this easy Online TTF->EOT Converter), one can create a Microsoft proprietary OpenType font file (having an EOT extension). Upload both the EOT and TTF files to your server. Using a single @font-face selector, load the Embedded OpenType font (EOT) for IE6, IE7 and IE8 first then the TrueType Font (TTF) for FireFox 3.5+, Safari (Win & Mac versions) & Opera v10+. BOOM …
