summaryrefslogtreecommitdiff
path: root/src/truetype/ttgload.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/truetype/ttgload.c')
-rw-r--r--src/truetype/ttgload.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index b7a844a6c..68a9b4ad5 100644
--- 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 ) )
{