freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] About the Cmap format 14


From: George Williams
Subject: Re: [ft-devel] About the Cmap format 14
Date: 11 Oct 2007 20:12:31 -0700

On Tue, 2007-10-09 at 23:56, Werner LEMBERG wrote:
> > if called on a format 14 charmap (which
> > shouldn't be possible in the first place). Instead a new routine
> >
> >          FT_Get_Char_Variant_Index
I believe the following patch will add cmap14 support to freetype.
(based on the cvs tree as it stood a couple of days ago)

New entry points:
  FT_Get_Char_Variant_Index( FT_Face   face,
                             FT_ULong  charcode,
                             FT_ULong  variantSelector )
     (returns the GID of the desired variant, or 0)
  FT_Get_Char_Variant_IsDefault( FT_Face   face,
                                 FT_ULong  charcode,
                                 FT_ULong  variantSelector )
     (returns 1 if this variant is the one that lives in unicode cmap
      returns 0 if this variant doesn't live in the unicode cmap
      returns -1 if this variant does not exist in the table)
  FT_Get_Variant_Selectors( FT_Face   face )
     (returns a list of all variant selectors in the subtable.
      the end of the list is marked by a 0 entry.
      returns NULL if there is no variant cmap subtable (or other error)
  FT_Get_Variants_Of_Char( FT_Face   face,
                           FT_ULong  charcode)
     (returns a 0-terminated list of all variant selectors which apply
      to this unicode character)
  FT_Get_Chars_Of_Variant( FT_Face   face,
                           FT_ULong  variantSelector )
     (returns a 0-terminated list of all unicode code points which have
      a variant glyph for this selector)

The only test font I've got is one I created myself with ff, so it is
questionable. I include it and a tiny little test program at:
  http://fontforge.sf.net/private/cmap14-test.tar.bz2

Attachment: cmap14.patch.bz2
Description: application/bzip


reply via email to

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