Re: CVS: commit tomas_f abi/src/af/gr/win gr_Win32Graphics.cpp

From: <msevior_at_physics.unimelb.edu.au>
Date: Wed Sep 14 2005 - 15:34:10 CEST

>
>
> Hi Dom,
>
>> I was looking at your last commit to
>> GR_Win32Graphics::glyphBox() and had some questions
>> about it. If you could please answer them using small
>> words, I'd appreciate it. Thanks.
>
> Sure.
>
>>
>> 1) In the Win9x case, why are you "converting" a
>> "ucs4" value into a glyph index?
>> 1.a) Isn't the input to the method already a glyph
>> index?
>> 1.a.i) If not, why isn't it?
>
> My understanding is that the input to the glyphBox() method is ucs4
> value of the character. This parameter is not documented in the abi
> sources, but it is typed as UT_UCS4Char, and we currently have no XP api
> for translating ucs4 values to glyph indices, so I assumed the typing is
> correct. It is also treated as a ucs4 character in the Unix version of
> the function, which was the starting point for implementing the win32
> version.
>

Yes, it's the ucs4 value.

>> 1.a.ii) If not, why does the method have the word
>> "glyph" in its name?
>
> I assume because it is asking for the glyph-box dimensions of the given
> character (it makes sense to speak of a glyph in the context of this
> function, it is GR_Font:: method).
>

Yes again. Luca needed the dimensions of each glyph (width and height) as
well as the horizontal and vertical offsets to correctly position the
glyph. Freetype has methods to get these dimensions. I did ucs4 => glyph
index => glyph dimensions via freetype.

Martin
Received on Wed Sep 14 15:35:29 2005

This archive was generated by hypermail 2.1.8 : Wed Sep 14 2005 - 15:35:30 CEST