freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] Storing font info in my executable


From: mpsuzuki
Subject: Re: [ft] Storing font info in my executable
Date: Sat, 7 May 2005 00:42:46 +0900

Hi

On Tue, 3 May 2005 09:42:27 +1000
"Ross Crawford" <address@hidden> wrote:

>The function FT_New_Memory_Face() allows me to associate a FT_Face with a
>font resource in memory, but I can't find any documentation that about what 
>format the resource should be.

The memory image for FT_New_Memory_Face() should be something
like mmap()-ed font file that FreeType supports its format:
TrueType, PostScript etc, it's similar to FT_New_Face() which
reads the font file. I'm afraid that you're thinking as
FT_New_Memory_Face() receives some "FreeType's internal data
structure", but it isn't. In fact, FreeType does not convert
a font file in format A into another format B, because FT's
internal data is font-format-dependent.

>Is it just a FT_FaceRec? If so, what elements need to be initialised,
>and what to? Is there a better way to do what I want?

Therefore, I'm afraid, you will be forced to generate a font
file image before calling FreeType functions. And, my another
worry is: "what font is easiest to convert the glyph outline
expression in your CAD data file?". As you can see, FreeType2
does not support Type3 (a font format that we can use fully
PostScript commands), so, the available options might be
TrueType language or PS (Type1/CFF/SVG) language only.
Both languages are very restricted system, and I'm afraid that
conversion from fully-handed 2-d vector data to them is not
easy to implement. I wish if the data in your CAD file is
imported from some font file which FreeType2 supports.
If you have enough sparetime, I recommend you to check some
font editor programs like fontforge.

Regards,
mpsuzuki




reply via email to

[Prev in Thread] Current Thread [Next in Thread]