Page 1 of 1

Question about Spans, TextDecorations, and custom RichText support

Posted: 07 Apr 2025, 18:37
by ARPP3
Good afternoon!

I am currently trying to add in support to our game, for feature parity rich-text support of legacy content that our users have created. Our previous game was shipped with Unity and we used TextMeshPro, allowing a subset of their RichText tags to be shown when presenting content in game. This is incredibly important for our studio since, almost the entirety of our content is user-authored. The tags we supported specifically were these ones:

italic, bold, strikethrough, underline, super-script, sub-script, vertical-offset, lowercase, uppercase, small-caps, character-space, color, monospace, and line break.

I've been writing modifications to the RichText class that's include with the Noesis SDK, but I am struggling to add in support for strikethrough, monospace, super-script, sub-script, and oddly enough very important one within our community, vertical-offset.

Here's what I've tried so far:
- I tried adding a TextDecorations="Strikethrough" in the markdown for a span but this is not working for me.
- I wanted to add a RenderTransform to a Span element hoping it would allow me to support the super-script/sub-script/vertical-offset with a simple translation on the Y-axis. For our purposes, this would be MORE than enough and offer the perfect amount of customization, since the voffset tag is used heavily in our old game. If this was/is possible, it would be the most flexible solution.
- For the monospace tag, I think I can achieve this effect simply by swapping out the font, and maybe using a tool to convert our primary font to a monospace variant, maybe using a tool like this one: https://github.com/cpitclaudel/monospacifier. But if there's support for this already then I'd love to know about it before going this route!

Please let me know if there's any way I can achieve any of these extra rich-tags within the confines of a simple extension, similar to your provided RichText extension,

Thank you,
David

Re: Question about Spans, TextDecorations, and custom RichText support

Posted: 07 Apr 2025, 20:04
by jsantos
Noesis supports (if available in the font) the Typography class. This should cover many of your requests, such as superscript and subscript.
  • For monospace, if Typography is not supported, switching the font seems to be the best approach.
  • Strikethrough is not implemented.
  • Vertical-offset is not implemented.
Please create tickets for any missing features you'd like us to track.

Re: Question about Spans, TextDecorations, and custom RichText support

Posted: 08 Apr 2025, 11:26
by ARPP3
Thank you! I will investigate the Typography class, and see if the font or a fallback can support this for the use cases. I can make some tickets now,

*edit: I created 2 tickets for this:
https://www.noesisengine.com/bugs/view.php?id=4057
https://www.noesisengine.com/bugs/view.php?id=4058

Marking this as closed, thank you!

Re: Question about Spans, TextDecorations, and custom RichText support

Posted: 08 Apr 2025, 19:58
by jsantos
Thank you for the tickets! Let's continue the conversation there.