[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ft-devel] Re: Some public APIs using FT_Int/FT_UInt should be improved
From: |
Werner LEMBERG |
Subject: |
[ft-devel] Re: Some public APIs using FT_Int/FT_UInt should be improved in future |
Date: |
Fri, 09 Jan 2009 11:10:02 +0100 (CET) |
> I'm sorry, you told to use FT_Long, but I committed FT_UInt32.
>
> 104 FT_EXPORT_DEF( FT_Error )
> 105 FT_Get_Advances( FT_Face face,
> 106 FT_UInt start,
> 107 FT_UInt count,
> 108 FT_UInt32 flags,
> 109 FT_Fixed *padvances )
> 110 {
>
> ...
>
> 143 flags |= FT_LOAD_ADVANCE_ONLY;
> 144 for ( nn = 0; nn < count; nn++ )
> 145 {
> 146 error = FT_Load_Glyph( face, start + nn, flags );
>
> ...
>
> As you can see, FT_Get_Advances() passes its 4th argument flags to
> FT_Load_Glyph() whose 3rd argument is declared as FT_UInt32 in
> public interface.
Actually, it's FT_Int32 (for reasons I no longer know):
FT_EXPORT( FT_Error )
FT_Load_Glyph( FT_Face face,
FT_UInt glyph_index,
FT_Int32 load_flags );
> To match their types, I declared the flag as FT_UInt32.
Hmm. Signed vs. unsigned...
> BTW, if there's any criterion to determine "FT_ULong" is better
> in public API (or "FT_UInt32" is better), please let me know.
For me, FT_Long and FT_Int look more `natural' than, say, FT_Int32.
But this is a feeling only.
Werner