[Development] QTextFormat::LayoutDirection as a character format property?
Igor Khanin
igor at khanin.biz
Thu Oct 31 14:51:01 CET 2024
Greetings,
I hope this is the right place to post this. I'm looking for advice as well as any historical context I can get.
The documentation states that the `QTextFormat::LayoutDirection` text format property is both a paragraph and a character property. When set on a block format, it indeed affects the block's base direction via `QTextBlock::textDirection`. However when set on a character format, to the best of my understanding it appears to have no effect whatsoever. I'd expect it to have some sort of similar impact on the BiDi algorithm - perhaps overriding the directional character type of the character to be L or R, or maybe making a sequence of characters with the same property value behave as if they were an isolation run, or some such. But that can't obviously happen currently, as `QBidiAlgorithm` has no access to any formats and finishes its' work before character formats are resolved anyway.
This appears to be the case since Scribe was first released back in Qt 4, or at the very least predates the current Git history. So my question is why then the documentation says that? Was there an intention to implement some behavior that then never happened?
Furthermore - would it make sense for this property to start _actually_ doing anything on individual characters? I have a hacky POC, but don't want to waste my own and other's time if this is something that would be considered too niche or disruptive.
Best,
Igor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20241031/c6839bfc/attachment.htm>
More information about the Development
mailing list