diff options
author | Anton Danilkin <afdw@yandex.ru> | 2021-04-12 18:49:03 +0200 |
---|---|---|
committer | Anton Danilkin <afdw@yandex.ru> | 2021-04-12 18:49:03 +0200 |
commit | 1fe3c5571253a5b6c7808981babff09af8fbb3ed (patch) | |
tree | 422dc86d021d20de1e8cf4997cc1c1b56879709f /src/cairo-svg-surface.c | |
parent | 2a8672d06ef98b5375c6eee825791c2797bef078 (diff) | |
download | cairo-1fe3c5571253a5b6c7808981babff09af8fbb3ed.tar.gz |
Do not emit empty glyph paths
Diffstat (limited to 'src/cairo-svg-surface.c')
-rw-r--r-- | src/cairo-svg-surface.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/cairo-svg-surface.c b/src/cairo-svg-surface.c index 40ebdf6af..043943e91 100644 --- a/src/cairo-svg-surface.c +++ b/src/cairo-svg-surface.c @@ -1106,15 +1106,17 @@ _cairo_svg_document_emit_outline_glyph_data (cairo_svg_document_t *document, return status; } - _cairo_output_stream_printf (document->xml_node_glyphs, - "<path"); + if (_cairo_path_fixed_size (scaled_glyph->path) != 0) { + _cairo_output_stream_printf (document->xml_node_glyphs, + "<path"); - _cairo_svg_surface_emit_path (document->xml_node_glyphs, - scaled_glyph->path, - NULL); + _cairo_svg_surface_emit_path (document->xml_node_glyphs, + scaled_glyph->path, + NULL); - _cairo_output_stream_printf (document->xml_node_glyphs, - "/>\n"); + _cairo_output_stream_printf (document->xml_node_glyphs, + "/>\n"); + } return status; } |