Re: How to create ttf file

From: Mike D Sutton (EDais_at_mvps.org)
Date: 04/24/04


Date: Sat, 24 Apr 2004 08:23:22 +0100


> Thank you for your quick reply.
> What I want to know is how and where chars and symbols information stored in
> the ttf file

The glyph data itself is stored within the "glyf" table of a TTF file, however from a GDI perspective you can extract the glyph data
from an HFONT (selected into a DC) using the GetGlyphOutline() API call.

> and how to convert a bmp file which contains chars and symbols to ttf file.
> I appreciate any help you provided.

A TTF font is made up of vectors which are easily scalable, a Bitmap on the other hand is raster based and not so easily scalable.
Your options would be either to create a Bitmap based font (.FON) such as MS Sans Serif and Courier which contains Bitmap versions
of each character what are scaled to the desired font size, or attempt to trace your Bitmap's edge contours and create vector data
to describe them but this is not an easy task.
In either case, creating a .TTF file from scratch in code is a very complex task, I'd recommend having a look around for a font
creation application that can do this kind of thing for you or at least create a base template that you can later inject your glyph
data into.
Hope this helps,

    Mike

 - Microsoft Visual Basic MVP -
E-Mail: EDais@mvps.org
WWW: http://www.mvps.org/EDais/



Relevant Pages

  • Re: enclose font in website
    ... about the software used to create it, but the resultant font file. ... Your program is using the TTF file on your local machine and you have ... It is your video card driver. ... Compare this to the GIF file format. ...
    (alt.html)
  • Re: Getting Info from a .TTF File
    ... a .TTF file IS a .TTF file, at least not in the strictest sense. ... TIMES.TTF file as an example...on Windows XP, it's actually an OpenType ... font, not a TrueType font. ...
    (microsoft.public.vb.general.discussion)
  • Re: How to determine a Truetype Filename
    ... > I need to be able to determine the filename of a chosen TrueType font. ... The fonts display name is embedded somewhere in the TTF file. ... Use the newsgroup archives: ...
    (borland.public.delphi.nativeapi)
  • RE: TTF File
    ... Can't you distribute the TTF file as well as the Excel file? ... I have a TTF File containing a specialized font that i want to use in my ... The problem is that when others open the spreadsheet, ...
    (microsoft.public.excel.programming)