>> Certainly, if you are going to dynamically allocate a slot for it.
>> I tried to avoid that.
> 
> Totally untested, but why wouldn't this work?
>
> [...]
>
> -      if ( FT_List_Find( &loader->composites,
> -                         FT_UINT_TO_POINTER( glyph_index ) ) )
> +      if ( FT_List_Find( &loader->composites, index ) )

How shall this work?  You are going to store pointers to integers in a
list.  As a consequence, two identical integers can have different
pointers.  How will you then find out whether such an integer is
already in the list?

Actually, only the FT_UINT_TO_POINTER macro makes `FT_List_Find' work
for this task.  You need a different function if you don't like this,
for example, putting the glyph indices into a hash and checking
whether a new value is already present.


    Werner

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

Reply via email to