Allows use of img tags in HTML label content. The following logic
is applied:
- Image path is set via the src="xxx" attribute. Local, HTTP, and
base64 encoded paths are permitted
- Any image format readable by QGIS can be used
- Image sizes can be specified via the width="##" and height="##"
attributes. If width or height is not specified it will automatically
be calculated from the original image size
- If width or height are specified, they are considered to be
in POINTS
- The css width/height settings are NOT respected (this is a Qt
limitation)
- Images are not supported for curved text labels
- Images are placed inline only, floating images are not supported
Sponsored by City of Freiburg im Breisgau
For multi-line labels, this allows use of either:
- HTML <p align="xxx"> attributes
- CSS "text-align: xxx"
- HTML <center>some text</center> tags
Supported alignments are left, right, center and justify
Horizontal alignment can be used in all contexts where
HTML text is rendered, EXCEPT for curved labels (since they
are restricted to single-line text)
Sponsored by City of Freiburg im Breisgau
...and other places HTML text formatting is accepted.
This allows use of CSS "word-spacing: 12" to increase the word
spacing in a section of HTML text. The word spacing is always
treated as being in point units.
Adjust the QgsTextRenderer::calculateScaleFactorForFormat logic
so that small text is scaled up to at least 50 pixels when
calculating text metrics
This avoids tiny differences in calculated text metrics for small
text from affecting how text wrapping is calculated, which can
otherwise result in words at the end of lines "bouncing" from line
to line as layouts and maps are zoomed out
Adds some text layout modes where the line heights are based
on cap heights or font ascent alone
These are required in order to port additional parts of QGIS
text rendering to the QgsTextRenderer class
This allows for either:
- <sup>superscript</sup> / <sub>subscript</sub> components in text,
where the text will be vertically super or subscript aligned
and automatically sized to 2/3rd of the parent font size. Users
can also set a fixed font size for the super/sub script by
including css rules, e.g. <sup style="font-size:33pt">super</sup>
- "vertical-align: super" or "vertical-align: sub" CSS formatting
rules in any other HTML element
Sponsored by OSGEO UK
Previously the line height was always set in multiples of the
text line spacing. This works fine for rendering text blocks
containing text of all the same sizes, but when we mix
text sizes in the one document then the relative line height
option doesn't cover all use cases. (e.g. when a constant
spacing between lines is desired even when the text on those
lines varies in height)