[truetype] Fix error handling for embedded bitmaps.

Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.

* src/truetype/ttgload.c (TT_Load_Glyph)
[TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: Handle error if font is not
scalable.
This commit is contained in:
Werner Lemberg 2017-05-15 21:24:04 +02:00
parent a7f276a281
commit 6e5445a232
2 changed files with 17 additions and 1 deletions

View File

@ -1,3 +1,13 @@
2017-05-15 Werner Lemberg <wl@gnu.org>
[truetype] Fix error handling for embedded bitmaps.
Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
* src/truetype/ttgload.c (TT_Load_Glyph)
[TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: Handle error if font is not
scalable.
2017-05-15 Alexei Podtelezhnikov <apodtele@gmail.com>
[autofit] Make autohint warping NORMAL option.

View File

@ -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 ) )
{