[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Devel] xadvance descrepancy between bitmpats & glyphs?
From: |
Ken Hancock |
Subject: |
[Devel] xadvance descrepancy between bitmpats & glyphs? |
Date: |
Tue, 29 Jun 2004 14:41:58 -0500 |
I'm adding code to cache transformed bitmaps, among them italics and
stretched.
In my iFTFaceRequester I call FT_Set_Transform() to set a global transform
for any Face_ID which should be transformed. I then have two routines which
use:
FTC_ImageCache_Lookup() to get the glyph->advance.x for line-layout and
FTC_SBitCache_Lookup() to get the sbit->xadvance for blitting
However, it looks like the advances are computed inconsistently:
In FT_Load_Glyph (irrelevant lines omitted):
slot->advance.x = slot->metrics.horiAdvance;
if ( ( load_flags & FT_LOAD_IGNORE_TRANSFORM ) == 0 )
{
/* transform advance */
FT_Vector_Transform( &slot->advance, &internal->transform_matrix );
}
In ftc_snode_load (irrelevant lines omitted):
xadvance = ( slot->metrics.horiAdvance + 32 ) >> 6;
slot->metrics.horiAdvance is UNTRANSFORMED
Shouldn't ftc_snode_load use:
xadvance = (slot->advance.x + 32 ) >> 6;
yadvance = (slot->advance.y + 32 ) >> 6;
Thanks in advance!
Ken
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Devel] xadvance descrepancy between bitmpats & glyphs?,
Ken Hancock <=