From 6dd345aec4fd274683016b6c838ae0b1fc219c2c Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Tue, 14 May 2019 10:37:20 +0200 Subject: Remove error message when SVG OpenType table is empty. --- src/libnrtype/OpenTypeUtil.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/libnrtype') 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; } -- cgit v1.2.3