[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FW: [Devel] incorrect types for some arguments in the TrueType driver
From: |
Graham Asher |
Subject: |
FW: [Devel] incorrect types for some arguments in the TrueType driver |
Date: |
Mon, 19 Apr 2004 09:35:49 +0100 |
Although Werner has now accepted the patch (and further suggestions by Steve
Hartwell) I thought it courteous to forward Lex's clarification. - G.A.
-----Original Message-----
From: Lex Warners
Sent: 18 April 2004 11:52 am
To: 'Graham Asher'
Subject: RE: [Devel] incorrect types for some arguments in the TrueType
driver
Hi Graham,
Let me provide some clarifications so the FreeType people can decide what
would be the most appropriate solution.
There are two issues here:
1. Consistency. The functions I suggest to change are in fact the only ones
that take a FT_UShort argument, all other glyph index arguments in the tt
driver take FT_Uint for glyph index:
load_truetype_glyph
Get_HMetrics
TT_Get_Metrics
TT_Access_Glyph_Frame
compute_glyph_metrics
Etc.
And in the TT_LoaderRec_ the glyph_index also a FT_UInt.
2. Getting the code work on Palm OS with the CodeWarrior compiler
The problem is that if a 4 byte int is supplied for a 2 byte function
argument, the compiler does not perform the implicit type conversion
correctly: The 2 most significant bytes end up in the function argument
(always resulting a 0 value for tt glyphs).
One could probably argue this is a compiler bug, however I just want to
solve the problem. Making the type conversion explicit in FT_Load_Glyph is
not an option since it could also call a driver that takes 4 byte ints for
the glyph index (I think).
The only feasible solution I can think of is therefore to make the typing of
glyph index consistent in the truetype driver functions, using FT_UInt.
Of course we'll be happy to provide more clarifications or test some
FreeType stuff on Palm OS for the benefit of the FreeType project.
Best regards,
Lex
Re: [Devel] incorrect types for some arguments in the TrueType driver, Werner LEMBERG, 2004/04/19
- FW: [Devel] incorrect types for some arguments in the TrueType driver,
Graham Asher <=