[librsvg: 1/3] rsvg-text: Remove old workaround for zero-sized text
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 1/3] rsvg-text: Remove old workaround for zero-sized text
- Date: Sat, 24 Feb 2018 03:22:52 +0000 (UTC)
commit 4e83eb0b14c062eb2e259655bd6f141f43f5ef97
Author: Federico Mena Quintero <federico gnome org>
Date: Fri Feb 23 21:12:59 2018 -0600
rsvg-text: Remove old workaround for zero-sized text
librsvg/rsvg-text.c | 4 ----
.../fixtures/render-crash/581491-zero-sized-text.svg | 20 ++++++++++++++++++++
2 files changed, 20 insertions(+), 4 deletions(-)
---
diff --git a/librsvg/rsvg-text.c b/librsvg/rsvg-text.c
index 5c121975..b6f3c728 100644
--- a/librsvg/rsvg-text.c
+++ b/librsvg/rsvg-text.c
@@ -592,10 +592,6 @@ rsvg_text_render_text (RsvgDrawingCtx * ctx, const char *text, gdouble * x, gdou
state = rsvg_current_state (ctx);
- /* Do not render the text if the font size is zero. See bug #581491. */
- if (state->font_size.length == 0)
- return;
-
layout = rsvg_text_create_layout (ctx, text);
pango_layout_get_size (layout, &w, &h);
iter = pango_layout_get_iter (layout);
diff --git a/tests/fixtures/render-crash/581491-zero-sized-text.svg
b/tests/fixtures/render-crash/581491-zero-sized-text.svg
new file mode 100644
index 00000000..78793ae3
--- /dev/null
+++ b/tests/fixtures/render-crash/581491-zero-sized-text.svg
@@ -0,0 +1,20 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg width="10cm" height="3cm" viewBox="0 0 1000 300"
+ xmlns="http://www.w3.org/2000/svg" version="1.1">
+ <desc>Example text01 - 'Hello, out there' in blue</desc>
+ <text x="250" y="150"
+ font-family="Verdana" font-size="0" fill="blue" >
+ Hello, out there
+ </text>
+ <text x="250" y="250"
+ font-family="Verdana" font-size="55" fill="red" >
+ Hello, out there
+ </text>
+
+ <!-- Show outline of canvas using 'rect' element -->
+ <rect x="1" y="1" width="998" height="298"
+ fill="none" stroke="blue" stroke-width="2" />
+</svg>
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]