Summary: | Cannot set superscript or subscript for the whole text in text tool | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Tiar <tamtamy.tymona> |
Component: | Tool/Text | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | ahab.greybeard, griffinvalley |
Priority: | NOR | ||
Version First Reported In: | 4.3.0 | ||
Target Milestone: | --- | ||
Platform: | Mint (Ubuntu based) | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Patch that fixes the issue in a wonky way. |
Description
Tiar
2020-09-16 13:08:50 UTC
I can confirm this It is possible to set the entire text to superscript or subscript by using the svg editor: Have one normal letter followed by super/subscript characters created in the rich text editor then save and close. Open for editing and use the svg editor to remove that one letter, then Save. The entire text will then be in superscript. However, if you edit again and use the rich text editor then it goes back to 'normal' text. Created attachment 179817 [details]
Patch that fixes the issue in a wonky way.
Ok, so... there's a bit of weirdness here.
You see, I'm not sure if SVG text are supossed to be able to have baseline-shift be applied at the paragraph level. Within Krita especially this doesn't mean much, because super and sub align to the parent font, but our textshapes have no parent font (css inheritance starts at the textshape).
I've attached a patch that makes this work with the default font-size, but I'm generally very skeptical of the whole thing, and I'm unsure if I should implement it, as it can make text layout dependent on default fontsize. If you setup the text to have a single span that is super-scripted, then it already works.
I need to think longer about this...
|