-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Allow using baseline for font marker placement #59732
Comments
Ideally we'd have a mode where the character bounds are calculated, and then the center of these used as the "origin" for the symbol... I think this would need to be an option though, or we'd break a lot of existing symbology |
@nyalldawson , was discussing this with @m-kuhn not too long ago and we both reached the same conclusion. |
This is yet another option for placement (which happens to work equally in this specific scenario on the image), no?
Agreed, the question is if we can extend the combobox for vertical placement or if we need a new checkbox or similar @signedav I think you already had some thoughts on this? |
Yes. Since I'm not working today I'll share em tomorrow and will much appreciate your feedback then. |
Thanks for the explanation. |
Yes. With |
Backing up a step, from @m-kuhn:
I'd say this particular font is an unusual situation (centering characters over the baseline). But there's MANY MANY symbol fonts which don't do this which would benefit from a proper "center over the actual character bounds" placement mode. (Eg, all the ESRI symbol fonts, which have characters like this: ) Couldn't BOTH situations be fixed with a "center marker over character bounds" mode? My preference would be for the existing modes in the Anchor Point combo (for font markers only!) to be renamed to "Top (Legacy)", "Bottom (Legacy)" "VCenter (legacy)" and then new modes added for "Top", "Middle", "Bottom" which are calculated based on the actual character bounds. If there's still a specific requirement for a "baseline" mode then that could also be added to this same combo box. All NEW font marker symbol layers would default to "Middle", so only existing ones would use the "VCenter (legacy)" mode... |
Thanks for your reply.
Yes. But I guess the reason is that the point where the symbol should be centered to is not the center of the symbol bound. ... and thats - as far as I understand the bound-approach - why it wont solve it for this. Wouldn't the baseline approach make sense for other normal fonts as well? Like here: |
Yes, you're correct. I'd still argue that we also need methods which consider the bounds to be useful for the majority of symbol fonts though 👍 |
Alright, I do agree that the reference to the individual bounds would make sense. Not only for the symbol fonts. So best would be to have an option to have the symbol bounds as reference and to have the font baseline as reference. And of course the third option of the inconsistent current way to do it. The symbol bounds would lead to (vertical) placement like this: And the baseline would lead to (vertical) placement like that: And the None (legacy) would lead to what it does currently: Place above (top) the position of the highest bound in the font plus (difference between highest point and baseline and the size of the font divided with two*) and below (bottom) of the baseline minus (difference between highest point and baseline and the size of the font divided with two*) and the center is like with the baseline. * what is the current "bug". See #59732 (comment) Means both (baseline and bounds) would make sense to implement, still if only one of them will be implemented, it might make sense to have the setting prepared as a combobox (enum) instead of a checkbox (bool). Does this make sense for you @nyalldawson @nirvn @m-kuhn ? P.S. having a meeting with the potential sponsor next week - will keep you up to date. |
Why not just go with my proposal of adding new options to the existing vertical align combo box? It avoids the need for another new widget, and avoids the (meaningless?) top/middle with baseline reference modes |
No strong opinion. Your suggestion means:
Or wont you make top and bottom bounds? |
Exactly! (And "center bounds" would become the new default) |
What is the bug or the crash?
It should be possible to use the baseline of a font for symbol placement.
The following image shows the font cadastra which has set the baseline to the center of the symbol. The point should be centered over the intersection point of the lines.
This is currently possibly by setting an offset, but this becomes complex with zoom levels and units
The font would be much more usable if the baseline could be set as reference for placement.
Steps to reproduce the issue
Download the font cadastra
Configure it as symbol marker as shown above
Versions
3.40
Supported QGIS version
New profile
Additional context
No response
The text was updated successfully, but these errors were encountered: