freetype
[Top][All Lists]
Advanced

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

Re: [ft] FT_New_Memory_Face and .ttc


From: Chia-I Wu
Subject: Re: [ft] FT_New_Memory_Face and .ttc
Date: Tue, 17 Jan 2006 14:48:50 +0800
User-agent: Mutt/1.5.11

On Mon, Jan 16, 2006 at 11:15:57AM +0100, Niels-Peter Nielsen wrote:
> If I select Gungsuh then GetFontData returns a buffer containing the
> part of the file that contains Gungsuh and GungsuhChe. Gungsuh is
> situated at offset 96624 in the file, so the offsets in the table
> directories for Gungsuh are off by 96624 bytes!
> 
> The question is, is there a way to make FreeType able to use the data?
> Or are there any alternative solutions that will allow me to create the
> proper FreeType face from a LOGFONT description?
(untested)

Let

        N      := num. of tables
        Min    := min(offset of tables)
        Offset := Min - (12 + 16 * N).

Then Offset should be the offset of the face in the TTC file.  Even if
it is not, it won't harm freetype.

If the data is writable, subtract it from the offset field of all
tables.  freetype should be able to load the face then.

If you cannot, implment your own FT_Stream where each `seek' would be
shifted by Offset bytes :-) 

-- 
Regards,
olv




reply via email to

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