diff options
author | Werner Lemberg <wl@gnu.org> | 2016-10-01 20:12:25 +0200 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2016-10-01 20:12:25 +0200 |
commit | fcc0ee80e1f31d4f215a08cc7f1066218176495b (patch) | |
tree | d417d5ad8b5a5c09c3a405a61a2845d427b87146 /src | |
parent | b0aacff474a4514566c287001e0fc9918756be32 (diff) | |
download | freetype2-fcc0ee80e1f31d4f215a08cc7f1066218176495b.tar.gz |
[sfnt] Disable bitmap strikes if we don't have a bitmap data table.
* src/sfnt/ttsbit.c (tt_face_load_sbit): Check whether we have
a bitmap data table.
Diffstat (limited to 'src')
-rw-r--r-- | src/sfnt/ttsbit.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/sfnt/ttsbit.c b/src/sfnt/ttsbit.c index 0a9011151..b5986aa7c 100644 --- a/src/sfnt/ttsbit.c +++ b/src/sfnt/ttsbit.c @@ -190,12 +190,14 @@ break; default: + /* we ignore unknown table formats */ error = FT_THROW( Unknown_File_Format ); break; } if ( !error ) - FT_TRACE3(( "sbit_num_strikes: %u\n", face->sbit_num_strikes )); + FT_TRACE3(( "tt_face_load_sbit_strikes: found %u strikes\n", + face->sbit_num_strikes )); face->ebdt_start = 0; face->ebdt_size = 0; @@ -218,6 +220,15 @@ } } + if ( !face->ebdt_size ) + { + FT_TRACE2(( "tt_face_load_sbit_strikes:" + " no embedded bitmap data table found;\n" + " " + " resetting number of strikes to zero\n" )); + face->sbit_num_strikes = 0; + } + return FT_Err_Ok; Exit: |