/[freetype]/ft2demos/src/ftbench.c
ViewVC logotype

Diff of /ft2demos/src/ftbench.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.18 by davidT, Mon Jul 12 20:48:57 2004 UTC revision 1.19 by freetype, Tue Feb 22 15:55:07 2005 UTC
# Line 180  int Line 180  int
180  fetch_test(FT_UInt idx,  fetch_test(FT_UInt idx,
181             FT_UInt charcode)             FT_UInt charcode)
182  {  {
183    FT_Glyph glyph;    FT_Glyph  glyph;
184      FT_Error  error;
185    
186    FT_UNUSED( charcode );    FT_UNUSED( charcode );
187    
188    return    error = FT_Load_Glyph( face, idx, FT_LOAD_DEFAULT );
189      FT_Load_Glyph(face, idx, FT_LOAD_DEFAULT) ||    if ( !error )
190      FT_Get_Glyph(face->glyph, &glyph);    {
191        error = FT_Get_Glyph( face->glyph, &glyph );
192        if ( !error )
193          FT_Done_Glyph( glyph );
194      }
195      return error;
196  }  }
197    
198    
# Line 196  cbox_test(FT_UInt idx, Line 202  cbox_test(FT_UInt idx,
202  {  {
203    FT_BBox  bbox;    FT_BBox  bbox;
204    FT_Glyph glyph;    FT_Glyph glyph;
205      FT_Error error;
206    
207    FT_UNUSED( charcode );    FT_UNUSED( charcode );
208    
209    if (FT_Load_Glyph(face, idx, FT_LOAD_DEFAULT) ||    error = FT_Load_Glyph( face, idx, FT_LOAD_DEFAULT );
210        FT_Get_Glyph(face->glyph, &glyph))    if ( !error )
211      return 1;    {
212    FT_Glyph_Get_CBox(glyph, FT_GLYPH_BBOX_PIXELS, &bbox);      error = FT_Get_Glyph( face->glyph, &glyph );
213    return 0;      if ( !error )
214        {
215          FT_Glyph_Get_CBox( glyph, FT_GLYPH_BBOX_PIXELS, &bbox );
216          FT_Done_Glyph( glyph );
217        }
218      }
219      return error;
220  }  }
221    
222    

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26