Changeset 262 for trunk/poppler/freetype2/include/freetype/ftglyph.h
- Timestamp:
- Jan 17, 2009, 10:45:05 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/poppler/freetype2/include/freetype/ftglyph.h
r251 r262 5 5 /* FreeType convenience functions to handle glyphs (specification). */ 6 6 /* */ 7 /* Copyright 1996-2001, 2002, 2003, 2006 by*/7 /* Copyright 1996-2001, 2002, 2003, 2006, 2008 by */ 8 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 9 /* */ … … 220 220 /* */ 221 221 /* <Description> */ 222 /* A function used to extract a glyph image from a slot. */ 222 /* A function used to extract a glyph image from a slot. Note that */ 223 /* the created @FT_Glyph object must be released with @FT_Done_Glyph. */ 223 224 /* */ 224 225 /* <Input> */ … … 428 429 /* */ 429 430 /* <Input> */ 430 /* render_mode :: An enumeration that describe how the data is*/431 /* render_mode :: An enumeration that describes how the data is */ 431 432 /* rendered. */ 432 433 /* */ … … 444 445 /* */ 445 446 /* <Note> */ 447 /* This function does nothing if the glyph format isn't scalable. */ 448 /* */ 446 449 /* The glyph image is translated with the `origin' vector before */ 447 450 /* rendering. */ 448 451 /* */ 449 452 /* The first parameter is a pointer to an @FT_Glyph handle, that will */ 450 /* be replaced by this function. Typically, you would use (omitting*/451 /* error handling):*/453 /* be _replaced_ by this function (with newly allocated data). */ 454 /* Typically, you would use (omitting error handling): */ 452 455 /* */ 453 456 /* */ … … 463 466 /* error = FT_Get_Glyph( face->glyph, &glyph ); */ 464 467 /* */ 465 /* // convert to a bitmap (default render mode + destroy old)*/468 /* // convert to a bitmap (default render mode + destroying old) */ 466 469 /* if ( glyph->format != FT_GLYPH_FORMAT_BITMAP ) */ 467 470 /* { */ 468 471 /* error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_DEFAULT, */ 469 472 /* 0, 1 ); */ 470 /* if ( error ) // glyph unchanged*/473 /* if ( error ) // `glyph' unchanged */ 471 474 /* ... */ 472 475 /* } */ … … 483 486 /* */ 484 487 /* */ 485 /* This function does nothing if the glyph format isn't scalable. */ 488 /* Here another example, again without error handling: */ 489 /* */ 490 /* */ 491 /* { */ 492 /* FT_Glyph glyphs[MAX_GLYPHS] */ 493 /* */ 494 /* */ 495 /* ... */ 496 /* */ 497 /* for ( idx = 0; i < MAX_GLYPHS; i++ ) */ 498 /* error = FT_Load_Glyph( face, idx, FT_LOAD_DEFAULT ) || */ 499 /* FT_Get_Glyph ( face->glyph, &glyph[idx] ); */ 500 /* */ 501 /* ... */ 502 /* */ 503 /* for ( idx = 0; i < MAX_GLYPHS; i++ ) */ 504 /* { */ 505 /* FT_Glyph bitmap = glyphs[idx]; */ 506 /* */ 507 /* */ 508 /* ... */ 509 /* */ 510 /* // after this call, `bitmap' no longer points into */ 511 /* // the `glyphs' array (and the old value isn't destroyed) */ 512 /* FT_Glyph_To_Bitmap( &bitmap, FT_RENDER_MODE_MONO, 0, 0 ); */ 513 /* */ 514 /* ... */ 515 /* */ 516 /* FT_Done_Glyph( bitmap ); */ 517 /* } */ 518 /* */ 519 /* ... */ 520 /* */ 521 /* for ( idx = 0; i < MAX_GLYPHS; i++ ) */ 522 /* FT_Done_Glyph( glyphs[idx] ); */ 523 /* } */ 486 524 /* */ 487 525 FT_EXPORT( FT_Error )
Note: See TracChangeset
for help on using the changeset viewer.