Font embedding example
- You must start with a ttf (TrueType) font file.
- From your ttf file, create an eot version using the online ttf to eot converter.
- Add this css to your html:
<style type="text/css">
@font-face
{
font-family: someFontName;
src: url(/font/yourFont.eot); /* for IE */
}
@font-face
{
font-family: someFontName;
src: url(/font/yourFont.ttf) format("truetype"); /* for all other browsers */
}
.embeddedFont
{
font-family: someFontName;
font-size: 36pt;
}
</style>
Make sure to include the @font-face definition with the ".eot" file first.
- Use the "embeddedFont" class wherever you want to use that font:
<div class="embeddedFont">This text will appear as you embedded font</div>
Here is "3D Let Brk" embedded in this page using the above technique:
3D Let Brk