<?xml version="1.0" encoding="utf-8"?>
<tutorial>

<description>Learn how to position images in HTML.</description>
<![CDATA[
<style>
@font-face {
font-family: Broken15;
font-style: normal;
font-weight: normal;
src: url(BROKEN0.eot);
}
.psycho {
font-family: Broken15, Verdana, 'Small Fonts', sans-serif;
font-size: 48px;
color: #000099;
}
</style>
]]>
<keywords>embedding font,  tutorial, fonts, eot, text, pixel, font, embed, include, html, web page, automatic, generation</keywords>
<title>Embedding Fonts</title>

<slug>
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. 
</slug>

<text>
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 <link><url>http://www.w3schools.com/browsers/browsers_stats.asp</url>W3C 
      Schools</link>, 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, <link><url>http://www.bitstream.com/categories/products/webfonttools/webfontmaker/index.html</url>Bitstream</link>. 
      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.<br></br><br></br>
First, you need to download the latest version of WEFT <link><url>http://groups.msn.com/MicrosoftWEFTuserscommunity/_homepage.msnw?pgmarket=en-us</url>here</link>. 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 <link><url>http://www.microsoft.com/typography/web/embedding/weft3</url>official homepage</link>.<br></br><br></br>
  
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 <b>Tools>Fonts to Embed</b>. Click on <b>Add</b> 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.
<br></br><br></br><image><name>pict1.gif</name><width>540</width><height>396</height></image><br></br><br></br>
Hit <b>Close</b> and click on the <b>Embed</b> button on the top toolbar. Choose a location were the .eot file is to be saved and click <b>Edit</b> to enter a domain name where the font can be used. The default options are fine for the three checkboxes.
<br></br><br></br><image><name>pict2.gif</name><width>540</width><height>396</height></image><br></br><br></br>

Click on <b>Finish</b> 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:

<![CDATA[ <pre>
@font-face {
    font-family: Broken15;
    font-style:  normal;
    font-weight: normal;
    src: url(BROKEN0.eot);
}
</pre> ]]> 
  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:
  
<![CDATA[ <pre>
.psycho {
	font-family: Broken15, Verdana, 'Small Fonts', sans-serif;
	font-size: 48px;
	color: #000099;
}
</pre> ]]> 
  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, <![CDATA[<pre> &lt;p class=&quot;psycho&quot&gt;This Looks Embedded to Me&lt;/p&gt; </pre>]]> produces:
<![CDATA[ <p align="center" class="psycho">This Looks Embedded to Me</p> ]]>
</text>

</tutorial>

