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: Werner LEMBERG
Subject: Re: [ft-devel] About the Cmap format 14
Date: Wed, 10 Oct 2007 08:56:30 +0200 (CEST)

>    I propose that
>          FT_Get_Char_Index
> should return 0 (or 0xffffffff?)

I prefer 0 for consistency.

> 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

OK.

>    Similarly
>
>          FT_Get_First_Char
>          FT_Get_Next_Char
>
> will never be called on a format 14 charmap.  I'm not sure what best
> reflects the spirit of these routines. Should there be routines
> which return all codePoints for a given variationSelector, or
> routines which return all variationSelectors for a given codePoint,
> or perhaps just a list of all variantSelectors? or all three?
>
>          FT_Get_First_Char_Of_Variant
>          FT_Get_Next_Char_Of_Variant
>
>          FT_Get_First_Variant_For_Char
>          FT_Get_Next_Variant_For_Char
> 
>          FT_Get_First_Variant_Selector
>          FT_Get_Next_Variant_Selector

I have no opinion here.  If you think this is the route to go, let's
do this.  However, I could imagine to have

  FT_Get_Chars_Of_Variant
  FT_Get_Variants_Of_Char
  FT_Get_Variant_Selectors

instead which return an array of all chars or variants, respectively.
Whether this makes sense, I don't know.  Hmm.  Your suggested
functions are probably better in the sense of memory consumption; my
suggestions can cause big allocations...

>    How should it behave if the current cmap is not a unicode cmap?

FT_Err_Invalid_CharMap_Handle?  In case you think this isn't
appropriate we could create a new error code.  Please check fterrdef.h
and pick up something appropriate...

> Should it look for a unicode cmap in the list, or just return error?

I prefer just an error.  Don't make FreeType too intelligent.  We have
already more than enough Microsoft products.

>    Should I extend the CMap class with these additional functions,
> or just make direct calls?

I think extending CMap is the logical thing: Adding
tt_cmap_14_class_rec to tt_cmap_classes, etc.


    Werner




reply via email to

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