Commit 752f39127b80368a60b1b84f8901694502340560

Werner Lemberg 2014-01-23T09:14:25

Fix Savannah bug #41310. * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap) <glyph_format==5>: Don't check metrics, which this format doesn't have. This is another correction to the commit from 2013-11-21.

diff --git a/ChangeLog b/ChangeLog
index 8df8049..1864f50 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2014-01-23  Werner Lemberg  <wl@gnu.org>
 
+	Fix Savannah bug #41310.
+
+	* src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap) <glyph_format==5>:
+	Don't check metrics, which this format doesn't have.
+	This is another correction to the commit from 2013-11-21.
+
+2014-01-23  Werner Lemberg  <wl@gnu.org>
+
 	Fix Savannah bug #41309.
 
 	* src/type1/t1load.c (t1_parse_font_matrix): Properly handle result
diff --git a/src/sfnt/ttsbit.c b/src/sfnt/ttsbit.c
index 7469ff1..cd671d9 100644
--- a/src/sfnt/ttsbit.c
+++ b/src/sfnt/ttsbit.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType and OpenType embedded bitmap support (body).                */
 /*                                                                         */
-/*  Copyright 2005-2009, 2013 by                                           */
+/*  Copyright 2005-2009, 2013, 2014 by                                     */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  Copyright 2013 by Google, Inc.                                         */
@@ -967,7 +967,6 @@
         break;
 
       case 2:
-      case 5:
       case 7:
         {
           /* Don't trust `glyph_format'.  For example, Apple's main Korean */
@@ -997,6 +996,10 @@
         }
         break;
 
+      case 5:
+        loader = tt_sbit_decoder_load_bit_aligned;
+        break;
+
       case 8:
         if ( p + 1 > p_limit )
           goto Fail;