freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] How to get the position of a glyph without rendering it


From: mpsuzuki
Subject: Re: [ft-devel] How to get the position of a glyph without rendering it
Date: Sun, 5 Dec 2010 04:32:46 +0900

Dear Albert,

I'm quite sorry that I slipped to reply to this issue.

Reading your sample, I understand your question is asking
why face->glyph->metrics and face->glyph->bitmap{_left,top},
{.width,.rows} are inconsistent after FT_Set_Transform().

http://freetype.sourceforge.net/freetype2/docs/reference/ft2-base_interface.html#FT_Set_Transform

has a note:
        Note that this also transforms the `face.glyph.advance' field,
        but not the values in `face.glyph.metrics'.

So I think this is the designed behaviour of FreeType2, but
yet I don't have good answer how to solve your problem.
Could you give me more time to consider about this issue?

Regards,
mpsuzuki

On Sat, 4 Dec 2010 18:07:36 +0000
Albert Astals Cid <address@hidden> wrote:

>A Dimecres, 20 d'octubre de 2010, Albert Astals Cid va escriure:
>> > Hi,
>> > 
>> > On Wed, 20 Oct 2010 01:29:29 +0100
>> > 
>> > Albert Astals Cid <address@hidden> wrote:
>> > >That code works fine for most of the fonts i tried but now i have
>> > >encountered a case in which
>> > >
>> > > round(-glyphMetrics->horiBearingX / 64.0);
>> > >
>> > >is -2 and
>> > >
>> > > -slot->bitmap_left;
>> > >
>> > >is 26
>> > 
>> > Could you tell me any sample fonts to reproduce
>> > this issue?
>> > 
>> > I think, the metric infos available before rendering
>> > come from metric tables, and the metric infos available
>> > after the rendering come from glyf table, so there
>> > can be incompatible values (rather, broken font may
>> > have different values).
>> 
>> Here some sample code and the font.
>
>Did you have any change to look at my code/font?
>
>Thanks,
>  Albert
>
>> 
>> Any help more than welcome,
>>   Albert
>> 
>> > Regards,
>> > mpsuzuki



reply via email to

[Prev in Thread] Current Thread [Next in Thread]