Bug report #18993
QGIS3 Layout: the html label renderer ignores many styles e.g. font-size, letter-spacing, line-height, text-indent, margin.
Status: | Rejected | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Map Composer/Printing | ||
Affected QGIS version: | 3.0.2 | Regression?: | No |
Operating System: | Windows 10 64-bit v1803 | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | invalid |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 26824 |
Description
Step to reproduce :
1. Add new Layout
2. Add Label
3. Put below as property
<style>
.htmlrender {
font-family: "Lucida Handwriting";
font-kerning: normal;
font-size: 600 pt;
font-variant: normal;
font-weight: bold;
letter-spacing: 10 em;
line-height: 1.42 cm;
text-indent: 5.0 cm;
text-overflow: ellipsis;
margin: 5 cm 5 cm 5 cm 5 cm;
//text-shadow: 0.5 mm 0.5 mm #808080;
}
</style>
<div class="htmlrender">
Lorem ipsum<br/>
Lorem ipsum<br/>
Lorem ipsum<br/>
Lorem ipsum<br/>
Lorem ipsum<br/>
Lorem ipsum<br/>
</div>
4. Enable HTML Render
5. Many CSS properties seem to be ignored
e.g. font-size, letter-spacing, line-height, text-indent, margin
- 2.18 Composer has no problems.
History
#1 Updated by sand thorn over 6 years ago
This should be changed to Category: Map Composer
#2 Updated by Harrissou Santanna over 6 years ago
- Category changed from Labelling to Map Composer/Printing
#3 Updated by Nyall Dawson about 6 years ago
- Resolution set to invalid
- Status changed from Open to Rejected
You need to remove the space before your unit type:
e.g.
font-size: 600pt;
#4 Updated by Mathieu Pellerin - nIRV about 6 years ago
For the record, it's a CSS syntax requirement, not a Qt-specific behavior here.