# HG changeset patch # User Pantxo Diribarne # Date 1588190923 -7200 # Node ID 3d6c5eb545159a9edee1979851c374959d1cfb70 # Parent 9646d752c76c1ceed960dc4f9dfe7727be75fe4c svgconvert: Allow switching fontangle in part of a text string (bug #58274) * octave-svgconvert.cc(draw): Add forgotten block for handling font-style in tspan elements. diff -r 9646d752c76c -r 3d6c5eb54515 src/octave-svgconvert.cc --- a/src/octave-svgconvert.cc Tue Apr 28 16:23:52 2020 -0700 +++ b/src/octave-svgconvert.cc Wed Apr 29 22:08:43 2020 +0200 @@ -435,7 +435,7 @@ else if (elt.tagName () == "tspan") { // Font - QFont saved_font(font); + QFont saved_font (font); QString str = elt.attribute ("font-family"); if (! str.isEmpty ()) @@ -450,6 +450,15 @@ font.setWeight (QFont::Normal); } + str = elt.attribute ("font-style"); + if (! str.isEmpty ()) + { + if (str != "normal") + font.setStyle (QFont::StyleItalic); + else + font.setStyle (QFont::StyleNormal); + } + int sz = elt.attribute ("font-size").toInt (); if (sz > 0) font.setPixelSize (sz);