support superscript at the end of the text - #95
Conversation
|
Hi @VakhoQ, thanks for your pull request. I will look at it a bit closer as soon as I find time for it. That could last a bit though, I am pretty busy at the moment. Best, |
|
@vandeseer |
|
Hey @VakhoQ, I am really sorry not having had a look earlier! There are some general remarks I have now after a first look: As you already said there is a lot of casting going on and it feels a bit hacky the way it is implemented right now. Reason being that is implemented within This is not very elegant. So I would suggest the following approach: Why not using a cell type of its own? E.g. |
|
Closed due to #125 |
I added functionality for SuperScritp.
Usage:
By default textRise is 0.
Note, right now only TextCell supports this functionality. In the future , I think we need abstract methods in the AbstractTextCell to avoid casting and checking instances:
Under the hood we have the following:
contentStream.setTextRise(styledText.getTextRise());Additionally, I add logic to move text to the next line if super-text does not fit to the current column.