DHTML
  Home arrow DHTML arrow Page 4 - Understanding Embedded Fonts
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
DHTML

Understanding Embedded Fonts
By: Vikram Vaswani, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 4
    2000-10-30


    Table of Contents:
  • Understanding Embedded Fonts
  • The How Of Embedded Fonts
  • Be True, My Doc!
  • Weft And Warp

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Understanding Embedded Fonts - Weft And Warp
    ( Page 4 of 4 )

    If you prefer doing things the Microsoft way, you can use WEFT to build embedded font files which are natively supported on Internet Explorer 4.x and above.

    The first time you install WEFT, it will scan your system and build a list of all available fonts; these fonts are then displayed to you in a neat table with icons indicating whether or not they can be embedded into your Web page (many font authors do not permit their fonts to be embedded, preferring instead to charge users for the privilege). Once the database has been built, WEFT will ask you for a list of HTML pages to scan, and will build a list of all the fonts used in those pages.

    At this point, you can select a subset of glyphs to be encoded into the embedded font file (identified with the .eot extension), and have WEFT generate the font files for you. Your decision on which glyphs to encode (because more glyphs means a larger file) should be based on the extent to which you plan to use the font; if you're using it for only a single line of text, it makes more sense to encode only a few specific characters.

    WEFT's documentation states that the program can also edit your HTML files to include the HTML code necessary to get the font files to work; however, my experience was that the program ended up corrupting the HTML file instead. It's advisable to copy the code from WEFT's template, and paste it into your Web documents yourself.

    Here's what a typical WEFT-enabled page looks like:
    
    <html>
    
    <head>
    
    <style type="text/css">
    
    <!-- /* $WEFT -- Created by: me (me@me.co.m) on 19-10-00 -- */
    
      @font-face {
    
        font-family: Staccato222 BT;
    
        font-style:  normal;
    
        font-weight: normal;
    
        src: url(http://www.melonfire.com/staccat0.eot);
    
      }
    
    -->
    
    </style>
    
    
    
    </head>
    
    
    
    <body>
    
    
    
    <font face="Staccato222 BT" size="+1">Am I looking good today or
    
    what?</font>
    
    
    
    </body>
    
    </html>
    
    
    The CSS rule above will use the font located at the URL "http://www.melonfire.com/staccat0.eot" to render the characters on the page. Caveat: don't expect this to work in Netscape's browser.

    Of the two approaches above, the TrueDoc format is preferable at the current time, since it allows users of either browser to view your embedded fonts correctly - a problem the OpenType format is yet to address. The WEFT tool is still under development, though, so keep checking the Microsoft Web site at http://www.microsoft.com/typography/ for updates on this issue.

    Till next time...stay healthy!

    This article copyright Melonfire 2000. All rights reserved.

     
     
    >>> More DHTML Articles          >>> More By Vikram Vaswani, (c) Melonfire
     

       

    DHTML ARTICLES

    - Rough Guide To The DOM (part 2)
    - Rough Guide To The DOM (part 1)
    - Filters And Transitions In IE5
    - Understanding Embedded Fonts




    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek