-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for HTML bold/italic/font size and font family to labelling #50103
Conversation
(should have no impact on existing releases, as the text fragements previously did not support properties which altered font metrics)
when creating fonts for document fragments
15743c8
to
10af6e3
Compare
content which varies in font metrics
10af6e3
to
7db3b3b
Compare
|
@nyalldawson , did some testing, it's really nice, good job. I did run into a crash (having to do with curved labels I think): I haven't worked out a reduced test project to replicate crash, but on a large project, I can replicate crash as soon as curved labels are on the canvas. Let me know if you need something or the above stacktrace is enough. One thing I've noticed is the absence of support for font-size in %. Is that a Qt limitation or is there a way to support that? I'd be nice to have it as you could still control the text size via UI and have parts be e.g. font-size:80% of the text size that's set via UI. In any case, super cool stuff. |
In future we probably want to support explicit control of vertical alignment for text, but for now baseline alignment is the best default option we can use.
98bd4a1
to
cb517e3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code change is, well, dense! :) I couldn't find anything wrong but it's not the easiest part of the src tree to navigate. I however did a fair amount of testing locally, and couldn't spot any further regressions. Good job. Just a few Qs.
|
@nyalldawson A documentation ticket will be opened at https://github.com/qgis/QGIS-Documentation when this PR is merged. Please update the description (not the comments) with helpful description and screenshot to help the work from documentors. Thank you! |
|
@nyalldawson |
This PR adds support for additional HTML formatting tags within labeling (and everywhere text renderer is used). Specifically:
Sponsored by the Swiss QGIS user group
Fixes #40532
Fixes #32098
Fixes #18727
Fixes #31501