From 3e6b92b1d24a6deb478140f2e1410bc98e6b4d9f Mon Sep 17 00:00:00 2001 From: Emden Gansner Date: Thu, 23 Mar 2017 14:42:21 -0400 Subject: [PATCH] Support opacity in svg fonts. Issue #1217. --- plugin/core/gvrender_core_svg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin/core/gvrender_core_svg.c b/plugin/core/gvrender_core_svg.c index 632e33c90..a24b53365 100644 --- a/plugin/core/gvrender_core_svg.c +++ b/plugin/core/gvrender_core_svg.c @@ -481,6 +481,8 @@ static void svg_textspan(GVJ_t * job, pointf p, textspan_t * span) gvprintf(job, " fill=\"#%02x%02x%02x\"", obj->pencolor.u.rgba[0], obj->pencolor.u.rgba[1], obj->pencolor.u.rgba[2]); + if (obj->pencolor.u.rgba[3] > 0 && obj->pencolor.u.rgba[3] < 255) + gvprintf(job, " fill-opacity=\"%f\"", ((float) obj->pencolor.u.rgba[3] / 255.0)); break; default: assert(0); /* internal error */ -- 2.40.0