freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] 答复: perfor mance on FreeType actions


From: rperez
Subject: Re: [ft-devel] 答复: perfor mance on FreeType actions
Date: Mon, 10 Apr 2006 01:29:25 -0700 (PDT)

Hi There,
I am trying to use the freetype caching to cache glyphs. It seems that I
managed to do so with one (major) exception - I cant seems to succeed in
advance the pen for each glyph.
I am using the FreeType 2.1.4 and my code goes something like this:

FTC_Image_Cache_Lookup(mFTImageCache, &imageDesc, glyph.id, &glyph.image);
FT_Outline_Get_BBox(&((FT_OutlineGlyph) glyph.image)->outline,  &bounds);
FT_Vector_Transform(&glyph.origin,&affine);
FT_Glyph_Transform(glyph.image,&affine,&glyph.origin);
FT_Glyph_To_Bitmap(&glyph.image,ft_render_mode_normal,(FT_Vector *)
NULL,MagickFalse);
bitmap=(FT_BitmapGlyph) glyph.image;

at that point the bitmap->left field should be updated to the right value
but it is always 0.

when I replace 
FTC_Image_Cache_Lookup(mFTImageCache, &imageDesc, glyph.id, &glyph.image);
with
FT_Load_Glyph(face,glyph.id,FT_LOAD_NO_BITMAP);
FT_Get_Glyph(face->glyph,&glyph.image);

(not using cache) the bitmap->left field is updated correctly.
any ideas?

Thanks,
Ronen.
--
View this message in context: 
http://www.nabble.com/performance-on-FreeType-actions-t1387531.html#a3837814
Sent from the Freetype - Dev forum at Nabble.com.





reply via email to

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