Skip to content

Commit

Permalink
maint: Merge stable to default.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmuetzel committed Oct 10, 2024
2 parents bdbc39f + 11cfa3b commit 6562f09
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/octave-svgconvert.cc
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,7 @@ draw (QDomElement& parent_elt, pdfpainter& painter)
if (! str.isEmpty ())
{
// Font
font = QFont ();
font.setFamily (elt.attribute ("font-family"));
font = QFont (str);

str = elt.attribute ("font-weight");
if (! str.isEmpty () && str != "normal")
Expand Down Expand Up @@ -535,7 +534,14 @@ draw (QDomElement& parent_elt, pdfpainter& painter)

QString str = elt.attribute ("font-family");
if (! str.isEmpty ())
font.setFamily (elt.attribute ("font-family"));
{
// QFont::setFamily() doesn't seem to work properly in Qt6
// (see bug #66306). Use the QFont constructor to update
// the current font.
font = QFont (str, -1, font.weight (),
font.style () == QFont::StyleItalic);
font.setPixelSize (saved_font.pixelSize ());
}

str = elt.attribute ("font-weight");
if (! str.isEmpty ())
Expand Down

0 comments on commit 6562f09

Please sign in to comment.