Tutorials
CSS
Web Design
XHTML
Javascript
PHP

Web Design Tutorials
Embedding fonts
Page Redirection
Access Hard Drives
Avoiding Spam Mail
Editable Page Content
Copyright Basics
File Include
Mailto Links
Maintain Framesets
Show the Hard Drive
Link Status Description


More information

Web Design Tutorials
Font Embedding

How to embed a True Type Font on your webpage.
You may have an interesting or weird font type that you want on your webpage, but in order for other people to be able to see this font you will need to embed it on your webpage. Why? Because when a visitor views a website, the only fonts that will display are those installed on the visitors system.

Therefore, if you want either a weird gothic font or an old celtic font such as in the main logo of my site (which is actually an image) you will need to either display the font in an image or embed the font in your webpage.

Embedding the font
To embed a font type on a WebPage first select the font you want to embed, either from your hard drive or download it from the Internet.
Then create an embedded font file. And lastly attach the font to your style sheet.

  1. Creating the Embedded File
  2. You need to download software to create an embedded font file which can be in two formats .pfr or .eot.




  3. Next we need to embed the file using CSS.
  4. Into the HEAD section of your document insert:

    Example with True Type

    <link rel = "fontdef" src="cool-font.pfr">

    To work in IE4 and above, you need to add a pointer to an ActiveX control immediately after the LINK tag OR ELSE create an OpenType file for Explorer and refer to both on your page.

    TrueDoc fonts stay within the browser: you can't download them to your system

    Example with Open Type

    <STYLE TYPE="text/css">
    <--!
    @font-face {
    src:url(fonts/cool-font.eot);
    }
    -->
    </STYLE>


    Discuss this in the Forum  

Search HeaphyDesigns



Stored Pages



Change Site Style
Select a style for the site:




More information