In ZIM LabelLetters, is there a way to apply superscript and subscript?

In ZIM LabelLetters, i try to use , but without success. Is there a way to apply superscript or subscript to letters? in ZIM, is there a work around to handling text superscript within labels?

subscript can be handled but i still cannot figure out how to handle superscript. Maybe with special font or special character?

CanvasLatex might be able to handle it. Or you can always access any letter in LabelLetters and .mov(0,-10) or some such.

Thank you!

1 Like

I have tried to find any documentation related to Canvas Latex but without success. I just wanted to do simple things such as:

2025 BUDGET
$20DOWN

where $ will be superscript with small font and down will be subscript with smaller font and in red color with canvas Latex. I thugh it will be easy. If it cannot be done, then i have no choice to go with ZIM Tile.

Something like this will probably work:

const text = new LabelLetters("The cost is $20").center();
text.labels[12].sca(.7).mov(0,-10)

The spacing did not change, but you could pass in an array of spacings if really needed or mov() the letters after the $.

This is the most flexible way! Thank You very much! I will try with ZIM LabelLetters containing different fonts. It should work like a charm. ZIM is amazing, so is Dr. Abstract!

2 Likes