diff options
author | David 'Digit' Turner <digit@google.com> | 2010-03-03 14:24:57 -0800 |
---|---|---|
committer | David 'Digit' Turner <digit@google.com> | 2010-03-03 15:33:53 -0800 |
commit | 295ffce55e0198e7a9f7d46b33f5c2b4147bf821 (patch) | |
tree | bda1a337e630483e46b2e4d4db803814437b765d /src/base/ftglyph.c | |
parent | 6fb02c1f75ab969890012dd1f01939d3444ddbc1 (diff) | |
download | android_external_freetype-295ffce55e0198e7a9f7d46b33f5c2b4147bf821.tar.gz android_external_freetype-295ffce55e0198e7a9f7d46b33f5c2b4147bf821.tar.bz2 android_external_freetype-295ffce55e0198e7a9f7d46b33f5c2b4147bf821.zip |
Update to FreeType 2.3.12
Diffstat (limited to 'src/base/ftglyph.c')
-rw-r--r-- | src/base/ftglyph.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/src/base/ftglyph.c b/src/base/ftglyph.c index 4130cb1..3505d6d 100644 --- a/src/base/ftglyph.c +++ b/src/base/ftglyph.c @@ -34,6 +34,7 @@ #include FT_BITMAP_H #include FT_INTERNAL_OBJECTS_H +#include "basepic.h" /*************************************************************************/ /* */ @@ -129,9 +130,7 @@ } - FT_CALLBACK_TABLE_DEF - const FT_Glyph_Class ft_bitmap_glyph_class = - { + FT_DEFINE_GLYPH(ft_bitmap_glyph_class, sizeof ( FT_BitmapGlyphRec ), FT_GLYPH_FORMAT_BITMAP, @@ -141,7 +140,7 @@ 0, /* FT_Glyph_TransformFunc */ ft_bitmap_glyph_bbox, 0 /* FT_Glyph_PrepareFunc */ - }; + ) /*************************************************************************/ @@ -255,9 +254,7 @@ } - FT_CALLBACK_TABLE_DEF - const FT_Glyph_Class ft_outline_glyph_class = - { + FT_DEFINE_GLYPH( ft_outline_glyph_class, sizeof ( FT_OutlineGlyphRec ), FT_GLYPH_FORMAT_OUTLINE, @@ -267,7 +264,7 @@ ft_outline_glyph_transform, ft_outline_glyph_bbox, ft_outline_glyph_prepare - }; + ) /*************************************************************************/ @@ -373,11 +370,11 @@ /* if it is a bitmap, that's easy :-) */ if ( slot->format == FT_GLYPH_FORMAT_BITMAP ) - clazz = &ft_bitmap_glyph_class; + clazz = FT_BITMAP_GLYPH_CLASS_GET; - /* it it is an outline too */ + /* if it is an outline */ else if ( slot->format == FT_GLYPH_FORMAT_OUTLINE ) - clazz = &ft_outline_glyph_class; + clazz = FT_OUTLINE_GLYPH_CLASS_GET; else { @@ -518,6 +515,10 @@ const FT_Glyph_Class* clazz; +#ifdef FT_CONFIG_OPTION_PIC + FT_Library library = FT_GLYPH( glyph )->library; +#endif + /* check argument */ if ( !the_glyph ) @@ -533,7 +534,7 @@ clazz = glyph->clazz; /* when called with a bitmap glyph, do nothing and return successfully */ - if ( clazz == &ft_bitmap_glyph_class ) + if ( clazz == FT_BITMAP_GLYPH_CLASS_GET ) goto Exit; if ( !clazz || !clazz->glyph_prepare ) @@ -546,7 +547,7 @@ dummy.format = clazz->glyph_format; /* create result bitmap glyph */ - error = ft_new_glyph( glyph->library, &ft_bitmap_glyph_class, + error = ft_new_glyph( glyph->library, FT_BITMAP_GLYPH_CLASS_GET, (FT_Glyph*)(void*)&bitmap ); if ( error ) goto Exit; |