In QGIS 3.16 I have a 3 lined label
"Projekt" || '\n' || "Art" || '\n' || "Bearb"
How can I make only the text of the first line (
"Projekt") bold or a bigger size?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.Sign up to join this community
In QGIS 3.16, in label properties, you can check 'render as HTML', so that Labels can be interpreted as HTML code. Than your label can be writed as:
'<b>'||"Projekt"||'</b>' || '<br>' || "Art" || '<br>' || "Bearb"
<b></b> to write bold style and
<br> to change line.
In my solution I have supposed that Projekt,Art and Bearb are attribute name.
HTML Styling in labels is currently limited to colors, but you can work around that by using John's dynamic SVG solutions (see here and here), or by exporting to SVG (keep text as text objects) and edit the labels manually in Inkscape or Illustrator. Also, this feature may be coming soon, as katagena helpfully pointed out here.
In 3.16 this is not possible with a single label but in the following QGIS 3.28 (will be released October 2022) this will be implemented. See more at blog post by North Road .