summaryrefslogtreecommitdiffstats
path: root/src/base/ftglyph.c
diff options
context:
space:
mode:
authorVictoria Lease <violets@google.com>2013-06-10 13:55:54 -0700
committerVictoria Lease <violets@google.com>2013-06-10 16:14:43 -0700
commit727dee178a392d20eb050d0c446f2fcc29058fa1 (patch)
treec3764963cd9267a20d27a3267af298e172529216 /src/base/ftglyph.c
parent8afe960626dbf326354b836fd4d63e05b6974195 (diff)
downloadandroid_external_freetype-727dee178a392d20eb050d0c446f2fcc29058fa1.tar.gz
android_external_freetype-727dee178a392d20eb050d0c446f2fcc29058fa1.tar.bz2
android_external_freetype-727dee178a392d20eb050d0c446f2fcc29058fa1.zip
Update freetype to 5e094c6fb2ddd6e8901a5679e2cbb8fa476a38ee
Integrated patches from freetype2 git repository, up to hashval 5e094c6fb2ddd6e8901a5679e2cbb8fa476a38ee, which is post-2.4.12. Most recent commit message from freetype git: [truetype] Improve handling of broken sbit advance widths. Noteworthy patches included: [cff] Add a new Type 2 interpreter and hinter. Add support for color embedded bitmaps (eg. color emoji). Change-Id: Ia8b6a67bc18f841b24f44edf80f81f663185b598
Diffstat (limited to 'src/base/ftglyph.c')
-rw-r--r--src/base/ftglyph.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/base/ftglyph.c b/src/base/ftglyph.c
index 591b57a..5dd28a8 100644
--- a/src/base/ftglyph.c
+++ b/src/base/ftglyph.c
@@ -4,7 +4,7 @@
/* */
/* FreeType convenience functions to handle glyphs (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2007, 2008, 2010 by */
+/* Copyright 1996-2005, 2007, 2008, 2010, 2012, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -29,6 +29,8 @@
#include <ft2build.h>
+#include FT_INTERNAL_DEBUG_H
+
#include FT_GLYPH_H
#include FT_OUTLINE_H
#include FT_BITMAP_H
@@ -65,7 +67,7 @@
if ( slot->format != FT_GLYPH_FORMAT_BITMAP )
{
- error = FT_Err_Invalid_Glyph_Format;
+ error = FT_THROW( Invalid_Glyph_Format );
goto Exit;
}
@@ -166,7 +168,7 @@
/* check format in glyph slot */
if ( slot->format != FT_GLYPH_FORMAT_OUTLINE )
{
- error = FT_Err_Invalid_Glyph_Format;
+ error = FT_THROW( Invalid_Glyph_Format );
goto Exit;
}
@@ -314,7 +316,7 @@
/* check arguments */
if ( !target )
{
- error = FT_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
@@ -322,7 +324,7 @@
if ( !source || !source->clazz )
{
- error = FT_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
@@ -361,12 +363,12 @@
if ( !slot )
- return FT_Err_Invalid_Slot_Handle;
+ return FT_THROW( Invalid_Slot_Handle );
library = slot->library;
if ( !aglyph )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
/* if it is a bitmap, that's easy :-) */
if ( slot->format == FT_GLYPH_FORMAT_BITMAP )
@@ -388,7 +390,7 @@
if ( !clazz )
{
- error = FT_Err_Invalid_Glyph_Format;
+ error = FT_THROW( Invalid_Glyph_Format );
goto Exit;
}
@@ -427,7 +429,7 @@
if ( !glyph || !glyph->clazz )
- error = FT_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
else
{
clazz = glyph->clazz;
@@ -441,7 +443,7 @@
FT_Vector_Transform( &glyph->advance, matrix );
}
else
- error = FT_Err_Invalid_Glyph_Format;
+ error = FT_THROW( Invalid_Glyph_Format );
}
return error;
}
@@ -510,7 +512,7 @@
FT_GlyphSlotRec dummy;
FT_GlyphSlot_InternalRec dummy_internal;
FT_Error error = FT_Err_Ok;
- FT_Glyph glyph;
+ FT_Glyph b, glyph;
FT_BitmapGlyph bitmap = NULL;
const FT_Glyph_Class* clazz;
@@ -547,10 +549,10 @@
dummy.format = clazz->glyph_format;
/* create result bitmap glyph */
- error = ft_new_glyph( library, FT_BITMAP_GLYPH_CLASS_GET,
- (FT_Glyph*)(void*)&bitmap );
+ error = ft_new_glyph( library, FT_BITMAP_GLYPH_CLASS_GET, &b );
if ( error )
goto Exit;
+ bitmap = (FT_BitmapGlyph)b;
#if 1
/* if `origin' is set, translate the glyph image */
@@ -600,7 +602,7 @@
return error;
Bad:
- error = FT_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}