From 2a442a745559440308409d49b3a2cf58cc10faea Mon Sep 17 00:00:00 2001 From: M Somerville Date: Mon, 15 Feb 2021 19:24:56 +0000 Subject: [PATCH] Remove bold text from SVG/PNG output, switch font. For some reason, the translation from SVG to PNG causes bold text to be typeset incorrectly (it looks like Imagemagick doesn't know to leave more space for bold or similar). So remove all the bold text from the body. --- .../easyparliament/templates/html/mp/votes_svg.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/www/includes/easyparliament/templates/html/mp/votes_svg.php b/www/includes/easyparliament/templates/html/mp/votes_svg.php index e9a2757a26..819883269e 100644 --- a/www/includes/easyparliament/templates/html/mp/votes_svg.php +++ b/www/includes/easyparliament/templates/html/mp/votes_svg.php @@ -22,16 +22,13 @@ $stance_padding_top = 14; $stance_padding_bottom = 8; - $tspan_bold_open = ''; - $tspan_bold_close = ''; - header("Content-type: image/svg+xml"); echo ''; ?> - + @@ -50,7 +47,7 @@ if (strpos($line, '*') !== False) { echo preg_replace( '#(?:^|[*])([^\r\n *][^*\n]*[^\r\n *])(?:$|[*])#i', - $tspan_bold_open . '$1' . $tspan_bold_close, + '$1', $line ); } else {