freetype
[Top][All Lists]
Advanced

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

[ft] FT_New_Memory_Face and .ttc


From: Niels-Peter Nielsen
Subject: [ft] FT_New_Memory_Face and .ttc
Date: Fri, 13 Jan 2006 14:54:56 +0100

Hello,

I have a problem getting FT_New_Memory_Face to work with fonts that are
stored in .ttc files. 

In my application, I use a standard Windows font selection dialog and
create a font from the returned LOGFONT structure. I select the font
into a device context and then call GetFontData. The returned data are
then passed to FT_New_Memory_Face like so:
        FT_New_Memory_Face( Library, pBufferBytes, bufferSizeInBytes, 0,
ftFace);
The problem is that for .ttc fonts, the TTCHeader has been stripped from
the data buffer, and I guess that the offsets in the encapsulated faces
thus become invalid. If I manually insert the TTCHeader before passing
the data to FT_New_Memory_Face then it works fine.

Am I missing something? If not, is there any chance that freetype would
be able to reconstruct the header, or adjust he offsets? BTW, I am using
freetype 2.1.10 on MS Windows.

Regards,
Niels-Peter







reply via email to

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