summaryrefslogtreecommitdiffstats
path: root/src/base/ftsynth.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/ftsynth.c')
-rw-r--r--src/base/ftsynth.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/base/ftsynth.c b/src/base/ftsynth.c
index 3098a60..cd68533 100644
--- a/src/base/ftsynth.c
+++ b/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-2015 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 */