Re: How to create ttf file
From: Mike D Sutton (EDais_at_mvps.org)
Date: 04/24/04
- Next message: cppaddict: "Reading Screen Pixels"
- Previous message: David Huang: "Re: How to create ttf file"
- In reply to: David Huang: "Re: How to create ttf file"
- Messages sorted by: [ date ] [ thread ]
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/
- Next message: cppaddict: "Reading Screen Pixels"
- Previous message: David Huang: "Re: How to create ttf file"
- In reply to: David Huang: "Re: How to create ttf file"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|