[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freetype
Subject:    Re: [ft] True Type Collection (TTC) shared glyph tables
From:       Werner LEMBERG <wl () gnu ! org>
Date:       2013-05-17 14:46:41
Message-ID: 20130517.164641.120605562.wl () gnu ! org
[Download RAW message or body]


> If I use a True Type Collection (TTC) font file when initializing my
> FreeType Face, is there anything special I need to do to render a
> character that is part of the shared table in the TTC (but not part
> of the individual TTF)?

There is a misconception of how TTCs work: As soon as you select a
face index, you can't distinguish the data from a TTF.  In other
words, it is not possible to specify where a glyph comes from.  Most
TTCs share a single `glyf' table for all subfonts.  However, some
fonts (most notably on the Mac) have more than a single `glyf' table.
Assuming that font 1 in the TTC accesses `glyf' table 1, and font 2
accesses `glyf' table 2, there is no possibility that you can get
glyphs from `glyf' table 2 while accessing font 1.

> At the moment FT_Get_Char_Index is returning 0 for the CJK Ideograph
> at U+7380, and the error symbol is being used.  However, if I open
> this font file in Windows' Character Map program it shows that this
> character is part of the font.

Which font?  Are you *sure* that Windows doesn't use a fallback font
for displaying this glyph?

> Is there a way for me to verify that this character actually is part
> of the shared TTC table?

Try the ftview demo program without command line option `-e'; the font
faces in the TTC are then accessed by glyph indices instead of
character codes, bypassing the cmap table.

> Any insight into TTC font files or this specific issue would be
> appreciated.

I strongly suggest that you read TTC section in the TrueType
specification:

  http://www.microsoft.com/typography/otspec/otff.htm


    Werner
_______________________________________________
Freetype mailing list
Freetype@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic