Index: third_party/freetype/src/base/ftsynth.c |
diff --git a/core/src/fxge/fx_freetype/fxft2.5.01/src/base/ftsynth.c b/third_party/freetype/src/base/ftsynth.c |
similarity index 87% |
rename from core/src/fxge/fx_freetype/fxft2.5.01/src/base/ftsynth.c |
rename to third_party/freetype/src/base/ftsynth.c |
index 2142261bf3cae11c5dfa1282b540beb9648b8bd1..0567bd537a4cb8decb7da4cfe77fd0fe60eb0b23 100644 |
--- a/core/src/fxge/fx_freetype/fxft2.5.01/src/base/ftsynth.c |
+++ b/third_party/freetype/src/base/ftsynth.c |
@@ -4,7 +4,7 @@ |
/* */ |
/* FreeType synthesizing code for emboldening and slanting (body). */ |
/* */ |
-/* Copyright 2000-2006, 2010, 2012 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, */ |
@@ -16,12 +16,12 @@ |
/***************************************************************************/ |
-#include "../../include/ft2build.h" |
-#include "../../include/freetype/ftsynth.h" |
-#include "../../include/freetype/internal/ftdebug.h" |
-#include "../../include/freetype/internal/ftobjs.h" |
-#include "../../include/freetype/ftoutln.h" |
-#include "../../include/freetype/ftbitmap.h" |
+#include <ft2build.h> |
+#include FT_SYNTHESIS_H |
+#include FT_INTERNAL_DEBUG_H |
+#include FT_INTERNAL_OBJECTS_H |
+#include FT_OUTLINE_H |
+#include FT_BITMAP_H |
/*************************************************************************/ |
@@ -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 */ |
@@ -139,10 +148,11 @@ |
if ( slot->advance.y ) |
slot->advance.y += ystr; |
- slot->metrics.width += xstr; |
- slot->metrics.height += ystr; |
- slot->metrics.horiAdvance += xstr; |
- slot->metrics.vertAdvance += ystr; |
+ slot->metrics.width += xstr; |
+ slot->metrics.height += ystr; |
+ slot->metrics.horiAdvance += xstr; |
+ slot->metrics.vertAdvance += ystr; |
+ slot->metrics.horiBearingY += ystr; |
/* XXX: 16-bit overflow case must be excluded before here */ |
if ( slot->format == FT_GLYPH_FORMAT_BITMAP ) |