- Home /
Text mesh pro - Vertical Text
Hello, How you can set text in TextMeshProUGUI to render vertically instead of horizontally? I cannot find any option to switch text orientation.
Cheers
Answer by $$anonymous$$ · Nov 21, 2019 at 06:28 PM
change gui width to zero and give some positive height.
The problem with this, is you lose the ability to use Auto-Size on the text. If Auto-Size is selected, the font will default to the $$anonymous$$imum size.
If anyone knows a way to get vertical alignment without losing the auto-size ability, I would love to know how you accomplished it.
Sorry for necroing this post. -Larry
Answer by TheTrueDuck · Jun 01 at 01:11 PM
There is a rotate tag which rotates each of your letters. So if you rotate them by 90 degrees, then un-rotate your gameobject by -90 degrees, you'll have a text object which you can rescale to your hearts desire, and which even works with paragraphs (docs.unity3d.com/Packages/com.unity.textmeshpro@4.0/manual/RichTextRotate.html)
You will probably need to increase the spacing per character in the spacing options, as there may be some intersecting letters now that the characters are rotated, but as long as the WD% in the auto size options is low enough (or ideally zero), it should work without a problem. If you want to go the extra step you can even create a custom stylesheet option in "Assets/TextMesh Pro/Resources/Style Sheets/Default Style Sheet.asset" which will automatically add the rotate tag (and maybe a vertical offset tag) at the beginning and end, and that way all you have to do is change the text sytle dropdown from normal to your new style sheet. (gameobject rotation and character spacing will have to be done manually though)
docs.unity3d.com/Packages/com.unity.textmeshpro@4.0/manual/StyleSheets.html
@Larry-Dietz This should also work with auto-sizing, as opposed to just setting width to zero
Answer by hirenmakwana · Jun 01 at 12:23 PM
keep wrapping enabled and set width size to something that can contain the character without size reduction, it'll work with auto-size too.
Your answer

Follow this Question
Related Questions
3D Text Size Relative To Screen? 4 Answers
How to add Japanese 2D text to 3D world 1 Answer
Blender model ugly textur 1 Answer
Problems about GUI fontsize 1 Answer