SVG print exports with wrong font #47017
Labels
Bug
Either a bug report, or a bug fix. Let's hope for the latter!
Print Layouts
Related to QGIS Print Layouts, Atlas or Reporting frameworks
What is the bug or the crash?
Text export of SVG in print layouts is buggy. My main problem is that the exported file uses fonts that are not always the correct one (specifically the wrong font variations).
My test case shows that a 'simple' font such as Helvetica-Regular is correct exported:
Litli-Árskógssandur
But more 'complicated' fonts (with more variations) such as Branding-Medium gets exported wrongly:
<style type="text/css"> .st0{fill-rule:evenodd;clip-rule:evenodd;fill:#FFFFFF;} .st1{fill-rule:evenodd;clip-rule:evenodd;fill-opacity:0;} .st2{fill-rule:evenodd;clip-rule:evenodd;fill:#E8718D;stroke:#232323;stroke-width:0.2399;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;} .st3{fill:#323232;} .st4{font-family:'Branding-SemilightItalic';} .st5{font-size:16.0764px;} </style>The underlying problem/cause seems to be that the former is using 'simple' structure with "font-family", whereas the latter uses css styles (wrongly)....
Attached .zip file has both full SVG files , plus test data and settings.
Steps to reproduce the issue
From the attached zip archive, open test_font_output.cgz and open the print layout and print to SVG output . Changing the font in the Label settings to 'Branding Medium' (see the settings in the .png files) will cause the said problem
Versions
<style type="text/css"> p, li { white-space: pre-wrap; } </style>Supported QGIS version
New profile
Additional context
Find the mention ZIP file with test data at https://kartoweb.itc.nl/fileshare/public/test_font_output.zip
The text was updated successfully, but these errors were encountered: