diff options
author | marha <marha@users.sourceforge.net> | 2015-02-22 14:47:01 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2015-02-22 14:47:01 +0100 |
commit | 7785694244cdfc5939ca4754cab4e08bd6980f99 (patch) | |
tree | e317021c83941073a12d69494425f0dbcbc9eaf8 /freetype/src/base/ftsynth.c | |
parent | c9aad1ae6227c434d480d1d3aa8eae3c3c910c18 (diff) | |
download | vcxsrv-7785694244cdfc5939ca4754cab4e08bd6980f99.tar.gz vcxsrv-7785694244cdfc5939ca4754cab4e08bd6980f99.tar.bz2 vcxsrv-7785694244cdfc5939ca4754cab4e08bd6980f99.zip |
Upgraded to freetype 2.5.5
Diffstat (limited to 'freetype/src/base/ftsynth.c')
-rw-r--r-- | freetype/src/base/ftsynth.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/freetype/src/base/ftsynth.c b/freetype/src/base/ftsynth.c index 3098a60fa..0567bd537 100644 --- a/freetype/src/base/ftsynth.c +++ b/freetype/src/base/ftsynth.c @@ -4,7 +4,7 @@ /* */ /* FreeType synthesizing code for emboldening and slanting (body). */ /* */ -/* Copyright 2000-2006, 2010, 2012, 2013 by */ +/* Copyright 2000-2006, 2010, 2012-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -48,9 +48,14 @@ FT_GlyphSlot_Oblique( FT_GlyphSlot slot ) { FT_Matrix transform; - FT_Outline* outline = &slot->outline; + FT_Outline* outline; + if ( !slot ) + return; + + outline = &slot->outline; + /* only oblique outline glyphs */ if ( slot->format != FT_GLYPH_FORMAT_OUTLINE ) return; @@ -84,12 +89,18 @@ FT_EXPORT_DEF( void ) FT_GlyphSlot_Embolden( FT_GlyphSlot slot ) { - FT_Library library = slot->library; - FT_Face face = slot->face; + FT_Library library; + FT_Face face; FT_Error error; FT_Pos xstr, ystr; + if ( !slot ) + return; + + library = slot->library; + face = slot->face; + if ( slot->format != FT_GLYPH_FORMAT_OUTLINE && slot->format != FT_GLYPH_FORMAT_BITMAP ) return; @@ -100,10 +111,8 @@ ystr = xstr; if ( slot->format == FT_GLYPH_FORMAT_OUTLINE ) - { - /* ignore error */ - (void)FT_Outline_EmboldenXY( &slot->outline, xstr, ystr ); - } + FT_Outline_EmboldenXY( &slot->outline, xstr, ystr ); + else /* slot->format == FT_GLYPH_FORMAT_BITMAP */ { /* round to full pixels */ |