diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2019-05-14 08:37:20 +0000 |
|---|---|---|
| committer | Tavmjong Bah <tavmjong@free.fr> | 2019-05-14 08:37:20 +0000 |
| commit | 6dd345aec4fd274683016b6c838ae0b1fc219c2c (patch) | |
| tree | b4058ff719687a4e535364f5f02a6c2ed8cf1263 | |
| parent | Regression fix: hide some toolbar icons on startup (diff) | |
| download | inkscape-6dd345aec4fd274683016b6c838ae0b1fc219c2c.tar.gz inkscape-6dd345aec4fd274683016b6c838ae0b1fc219c2c.zip | |
Remove error message when SVG OpenType table is empty.
| -rw-r--r-- | src/libnrtype/OpenTypeUtil.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libnrtype/OpenTypeUtil.cpp b/src/libnrtype/OpenTypeUtil.cpp index 5e5e439bd..b5a0760ee 100644 --- a/src/libnrtype/OpenTypeUtil.cpp +++ b/src/libnrtype/OpenTypeUtil.cpp @@ -336,10 +336,15 @@ void readOpenTypeSVGTable(const FT_Face ft_face, // We do it the hard way! hb_face_t *hb_face = hb_ft_face_create_cached (ft_face); hb_blob_t *hb_blob = hb_face_reference_table (hb_face, HB_OT_TAG_SVG); - unsigned int svg_length = hb_blob_get_length (hb_blob); if (!hb_blob) { - // No SVG glyphs in font! + // No SVG table in font! + return; + } + + unsigned int svg_length = hb_blob_get_length (hb_blob); + if (svg_length == 0) { + // No SVG glyphs in table! return; } |
