[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: |
mpsuzuki |
Subject: |
[ft-devel] Re: Some public APIs using FT_Int/FT_UInt should be improved in future |
Date: |
Fri, 9 Jan 2009 16:40:12 +0900 |
On Wed, 24 Dec 2008 18:27:22 +0100 (CET)
Werner LEMBERG <address@hidden> wrote:
>> A) Some 32bit (or more, in future extension?) flags are
>> interchanged by FT_UInt.
>>
>> Example: FT_Get_Advance(), FT_Get_Advance() receive flags by
>> FT_UInt type, but FT_ADVANCE_FLAG_FAST_ONLY (=0x20000000UL) etc
>> cannot be passed by FT_UInt on 16bit system.
>>
>> Although the extension from FT_UInt to portable 32bit integer
>> makes 16bit systems troubled, I think it should be extended. To
>> keep ILP32/LP64 systems unchanged, using FT_UInt32 would be most
>> appropriate.
>
>Please use FT_Long for FT_Get_Advance and FT_Get_Advances since they
>are new in version 2.3.8, so no compatibility problems can occur.
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. To match their types, I declared the flag
as FT_UInt32.
BTW, if there's any criterion to determine "FT_ULong" is better
in public API (or "FT_UInt32" is better), please let me know.
Regards,
mpsuzuki
- [ft-devel] Re: Some public APIs using FT_Int/FT_UInt should be improved in future,
mpsuzuki <=