I have a slight problem with my printing char by char to a TextMeshPro Text (UI) field. Everything works great except when I try to use the rich text editor feature <font=x> to make my text a bigger size (showcased by the red text in the side by size of the same text field before and after text of a bigger font is added). When I add the first character of a bigger size my text auto-resizes itself to align the top of the biggest font to the top of the TMP text box, which causes the smaller text to shift down slightly. If possible I would like to avoid this.
Currently I have my text set to “Top” alignment which is how I would like my text to align (to the top of the text box). If I set my text to “Baseline” alignment that naturally fixes the issue because the smaller and bigger font have the same baseline alignment, but then my text is in the middle of the text box and the text shifts up when a new line is added, which is not what I want.
I can think of a possible solution where I add an invisible character (or a space) of the max font size that will be displayed in the set of characters to be printed so it’s already offset before I print the big characters, but If there are any fixes that would make baseline alignment or another easier fix like that work I would appreciate hearing them.
Thanks!
Side by side of the text being printed out in game view, I added the red and gray line so you can see the height difference


