diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2009-07-25 17:48:01 -0700 |
---|---|---|
committer | Jean-Baptiste Queru <jbq@google.com> | 2009-07-25 17:48:01 -0700 |
commit | dc280eeb0aa3d55aaf6584c86623bf999ebd1736 (patch) | |
tree | 14b8437e23a816c57512fe472fdef4c7875c2eba /src/base/ftsynth.c | |
parent | 885cd2c19cbf73725d51f6b184d087b28343de1e (diff) | |
parent | 77f63d23f7d380b0ff02c18fd6a154ab9063128a (diff) | |
download | android_external_freetype-dc280eeb0aa3d55aaf6584c86623bf999ebd1736.tar.gz android_external_freetype-dc280eeb0aa3d55aaf6584c86623bf999ebd1736.tar.bz2 android_external_freetype-dc280eeb0aa3d55aaf6584c86623bf999ebd1736.zip |
Merge korg/donut into korg/master
Diffstat (limited to 'src/base/ftsynth.c')
-rw-r--r-- | src/base/ftsynth.c | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/src/base/ftsynth.c b/src/base/ftsynth.c index ff88ce9..443d272 100644 --- a/src/base/ftsynth.c +++ b/src/base/ftsynth.c @@ -68,36 +68,13 @@ /*************************************************************************/ - FT_EXPORT_DEF( FT_Error ) - FT_GlyphSlot_Own_Bitmap( FT_GlyphSlot slot ) - { - if ( slot && slot->format == FT_GLYPH_FORMAT_BITMAP && - !( slot->internal->flags & FT_GLYPH_OWN_BITMAP ) ) - { - FT_Bitmap bitmap; - FT_Error error; - - - FT_Bitmap_New( &bitmap ); - error = FT_Bitmap_Copy( slot->library, &slot->bitmap, &bitmap ); - if ( error ) - return error; - - slot->bitmap = bitmap; - slot->internal->flags |= FT_GLYPH_OWN_BITMAP; - } - - return FT_Err_Ok; - } - - /* documentation is in ftsynth.h */ FT_EXPORT_DEF( void ) FT_GlyphSlot_Embolden( FT_GlyphSlot slot ) { FT_Library library = slot->library; - FT_Face face = FT_SLOT_FACE( slot ); + FT_Face face = slot->face; FT_Error error; FT_Pos xstr, ystr; @@ -123,10 +100,11 @@ } else if ( slot->format == FT_GLYPH_FORMAT_BITMAP ) { - xstr = FT_PIX_FLOOR( xstr ); + /* round to full pixels */ + xstr &= ~63; if ( xstr == 0 ) xstr = 1 << 6; - ystr = FT_PIX_FLOOR( ystr ); + ystr &= ~63; error = FT_GlyphSlot_Own_Bitmap( slot ); if ( error ) |