Free Webmasters Resource
 

Free Graphics, Tutorials, Scripts, Webmaster Forums, Web Templates, SEO Tools, & Much More!!

Home Scripts Tutorials Free Downloads Articles SEO Play Free Games Web Templates

Embedding Fonts

At times you may want to use fonts other than the likes of Arial, Verdana, Times New Roman, and other mainstream fonts installed on most computers today. To implement special fonts on a web page, your choices are to either use high bandwidth-consuming images or embed the fonts. Embedding fonts is a very efficient and easy process, however support for doing so is still not as widespread as we would like. Right now, embedding fonts the way this tutorial describes is only compatible with Internet Explorer 4 and above (according to W3C Schools, 93% of internet users use IE4+ as of October 2002). This method converts a common True Type Font to the Embedded Open Type format (.eot files) which allows fonts to be downloaded and only used on specific web domains. Netscape 4 as well as Internet Explorer 4 and above also support embedding fonts in TrueDoc format (.pfr files), but since 1998, support for this format has eroded heavily. Encoding fonts in this format requires the purchase of expensive software that is being phased out by many of its developers, including its creator, Bitstream. So, that leaves us with just EOT, a slightly inferior format that was created by Microsoft and works beautifully with Internet Explorer. Let's get started.

First, you need to download the latest version of WEFT here. WEFT is a free program written by Microsoft to encode normal TrueType or Postscript fonts into the .eot format. For more information about WEFT you may want to visit its official homepage.

WEFT is a surprisingly powerful program that can do things such as examine an already existing web page and create a .eot file containing all the fonts used on it. For this tutorial, however, we'll just stick to the basics of how to embed a single font. Open up WEFT, close the Add Web Pages pop-up if it should open, and go to Tools>Fonts to Embed. Click on Add and choose the font that you would like to embed. The default settings for the rest of the options are fine. I chose to embed Broken 15, a font available on Spoono in the Grungy Fonts section.

Hit Close and click on the Embed button on the top toolbar. Choose a location were the .eot file is to be saved and click Edit to enter a domain name where the font can be used. The default options are fine for the three checkboxes.

Click on Finish and like magic, your .eot file will be created. The sleekest way to embed your font in a web page is by loading it in a .css file. If you already have a .css file for the page, open that. Otherwise, open a blank text file and save it afterwards with a .css extension. Type the following in your .css file:

@font-face {
font-family: Broken15;
font-style: normal;
font-weight: normal;
src: url(BROKEN0.eot);
}


Notice that the last attribute points to the location of the .eot file the I created before. Enter your file there, and also write a name to give the font in the font-family attribute. You may call it whatever you want. Next, create a class that makes use of your font in your .css file by typing something like this:

.psycho {
font-family: Broken15, Verdana, 'Small Fonts', sans-serif;
font-size: 48px;
color: #000099;
}


The attributes are self-explanatory Notice that additional fonts have been defined for browsers.cough.Netscape.that aren't compatible with EOT. Also, if your font has a space in its name, you should include single quotes around it, like Small Fonts has above.

Save your .css file and upload it along with your .eot file to the same directory on your web site. Now any time you use your class in a web page, the embedding font will be used. In my case, <p class="psycho">This Looks Embedded to Me</p> produces:

This Looks Embedded to Me



 

Tutorials: HTML

Title/Description

Level

Backgrounds: Tutorial
Learn how to effectively add backgrounds to your page that make your page look professional or amateur.

Beginner

Imagemaps: Tutorial
Make one image into various clickable regions using only HTML

Intermediate

Embedding Fonts: Tutorial
Learn how to use uncommon fonts in web pages by embedding them.

Advanced

Images: Tutorial
Positioning images can make your images look just right when inserted into text.

Intermediate

Form Effects: Tutorial
Learn how to create trendy forms with simple style commands as well as with CSS classes.

Intermediate

Layers: Tutorial
Layers can make complicated image placement possible.

Advanced

Forms: Tutorial
Use forms to gather information from your users.

Advanced

Links: Tutorial
Making links in HTML is the easiest thing you will ever do.

Beginner

Frames: Tutorial
Learn how to create frames that enable you to create navigation systems on your site.

Advanced

Scrollbars: Tutorial
Learn how to add effects to your scrollbars and add flavor to your page.

Advanced

Hide From Print: Tutorial
Learn how to only allow a visitor to print part of your page using CSS.

Intermediate

SSI: Tutorial
Learning how to do SSI will save you a lot of authoring time.

Advanced

Horizontal Line: Tutorial
The horizontal line serves as a great separator tool.

Beginner

Table Styles: Tutorial
Learn how to add various table styles such as dash or dot borders, and many other things.

Intermediate

Iframes: Tutorial
Iframes can organize your website into clean sections.

Advanced

Tables: Tutorial
Organize your web page layouts with tables.

Intermediate

216 Web Safe Color Chart: Tutorial
The 216-color color-safe palette refers to colors (RGB values) that will appear the same on either IE or Netscape and Windows or Mac platforms.

Beginner

Pantone RGB/Hex/HTML Colors: Tutorial
This table contains all pantone colors converted to RGB and Hex. It displays them all in HTML colors.

Intermediate

 


Home Contact Credits Flash Templates Webmaster Forums Site Map Webmaster Resources Advertise

Templates Resource Hosting
Domain Names · Templates Resource