From ec0bab5697bb31ba980810145f62e3799946ec60 Mon Sep 17 00:00:00 2001 From: Victoria Lease Date: Thu, 12 Dec 2013 09:12:18 -0800 Subject: Update freetype to 8bb09b0fe4d9747bcf452a777cabed7d7ef435e2 Integrated patches from freetype2 git repository, up to hashval 8bb09b0fe4d9747bcf452a777cabed7d7ef435e2, which is post-2.5.2. Most recent commit message from freetype git: [truetype] Simplify logic of rendering modes. Noteworthy patches included: [sfnt] Fix handling of embedded bitmap strikes. [truetype] Improve handling of buggy embedded bitmap strikes. Add FT_FACE_FLAG_COLOR and FT_HAS_COLOR. Change-Id: I4a22d96c9443c7a587475ca0a9c684843e144b18 --- src/base/ftbitmap.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/base/ftbitmap.c') diff --git a/src/base/ftbitmap.c b/src/base/ftbitmap.c index 975818e..182b1cc 100644 --- a/src/base/ftbitmap.c +++ b/src/base/ftbitmap.c @@ -385,6 +385,10 @@ FT_Long l; + /* Short-circuit transparent color to avoid div-by-zero. */ + if ( !a ) + return 0; + /* * Luminosity for sRGB is defined using ~0.2126,0.7152,0.0722 * coefficients for RGB channels *on the linear colors*. -- cgit v1.2.3