| Summary: | Mixed text alignment not working in pre-wrap text with inline-size | ||
|---|---|---|---|
| Product: | [Applications] krita | Reporter: | Alvin Wong <alvin> |
| Component: | Tool/Text | Assignee: | Krita Bugs <krita-bugs-null> |
| Status: | RESOLVED INTENTIONAL | ||
| Severity: | normal | CC: | griffinvalley |
| Priority: | NOR | ||
| Version First Reported In: | git master (please specify the git hash!) | ||
| Target Milestone: | --- | ||
| Platform: | Microsoft Windows | ||
| OS: | Microsoft Windows | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Alvin Wong
2023-07-17 16:36:53 UTC
DId a little bit of quick reading of the SVG 2 spec. So it seems for auto-wrapped text, x/y (other than those on the `text` element or the first `tspan` when using `inline-size`) are ignored, and I suppose as a result `text-anchor` on these `tspan`s doesn't do anything. (When using `inline-size`, `text-anchor` can only anchor the wrapping area determined by `inline-size`.) This means it is not a bug, that `inline-size` doesn't support lines with different alignment. It will require using `text-align` with text-in-shape. @Wolthera Did I understand it correctly? So, the core problem here is that SVG text overall only has a single block/paragraph per text, while Qt text document of course allows for multiple. So neither text-anchor nor text-align would allow for mixed-alignment in a wrapped text. I remember when Halla and I were pair programming on the conversion for QTextDocument to SVG, we discussed whether it would make sense to have the conversion spit out multiple text shapes, one for each block, but it was deemed too complicated to roundtrip. I'll close it as intentional. |