ref: 6e5445a232cbdbf18a45629cf2f12a81c043607f
parent: a7f276a281b2741b14beadb00f5d8414c464e07c
author: Werner Lemberg <[email protected]>
date: Mon May 15 17:24:04 EDT 2017
[truetype] Fix error handling for embedded bitmaps. Problem reported by Hin-Tak Leung <[email protected]>. * src/truetype/ttgload.c (TT_Load_Glyph) [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: Handle error if font is not scalable.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2017-05-15 Werner Lemberg <[email protected]>
+
+ [truetype] Fix error handling for embedded bitmaps.
+
+ Problem reported by Hin-Tak Leung <[email protected]>.
+
+ * src/truetype/ttgload.c (TT_Load_Glyph)
+ [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: Handle error if font is not
+ scalable.
+
2017-05-15 Alexei Podtelezhnikov <[email protected]>
[autofit] Make autohint warping NORMAL option.
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -2621,7 +2621,13 @@
IS_DEFAULT_INSTANCE )
{
error = load_sbit_image( size, glyph, glyph_index, load_flags );
- if ( !error )
+ if ( error )
+ {
+ /* return error if font is not scalable */
+ if ( !FT_IS_SCALABLE( glyph->face ) )
+ return error;
+ }
+ else
{
if ( FT_IS_SCALABLE( glyph->face ) )
{