[Qgis-user] Labeling: Allow HTML Formatting, text-size and map units
Thomas Schüttenberg
thomas at qgis.de
Thu May 16 06:39:10 PDT 2024
Hi Chris,
yes I tried that. Any css-unit I could think of as well as em, % and code-words (large). But only pt resulted in a visible change on the canvas.
Not sure if it is just not implemented or if it is a bug.
Thomas
> chris hermansen <clhermansen at gmail.com> hat am 15.05.2024 21:00 CEST geschrieben:
>
>
> Thomas and list,
>
>
> On Wed, May 15, 2024 at 7:20 AM Thomas Schüttenberg via QGIS-User <qgis-user at lists.osgeo.org> wrote:
> > Ha!
> > I found an other way around to do the trick, suitable for my use case at least:
> >
> > 1) increasing the (overall) text size setting on the text tab by 2/3
> > 2) putting only the attributes/text strings of the second and following lines between <sub>...</sub> tags, which renders them about 2/3 smaler, i.e. same as before.
> >
> > The (reverse) result is a multi line label with the first line emphazised by its larger size! ;-)
> >
> > "Bezeichnung" || '<p><sub>D ' || round("Deckelhohe",2) || '</sub></p><p><sub>S ' || round( "Sohlhohe" ,2) || '</sub></p>'
> >
> In your first note you mentioned:
>
> > But only pt (points) seams to work as the unit in this place, which gives a fixed size throughout all scales and does not respect the behavior of the map units with maximum scale setting.
>
> I suppose you tried style="font-size: 75%;" and maybe style="font-size: 0.75em;", and they did not work?
>
> I wonder if, besides <sub>...</sub>, you might have tried <small>...</small>?
> --
>
> Chris Hermansen · clhermansen "at" gmail "dot" com
>
> C'est ma façon de parler.
More information about the QGIS-User
mailing list