- Home /
 
TextMesh is not rendering Font correctly
I am trying to make a font selection dialog in unity. For that I used a DropDown where you can select a font.

The different fonts render correctly in the UI but when I try to load the font in the 3d text of my scene it does not look right.

For loading I used this code:
  void SetFont(int index) {
     GetComponent<TextMesh>().font =
                   Font.CreateDynamicFontFromOSFont(Font.GetOSInstalledFontNames()[index], 1);
 }
 
               The strange thing about this is that I used almost the exact same line of code in the DropDown just with Text Component. Also when selecting a small font it shows this odd text like in the image but when selecting a bigger font it loads infinite but does not show "program not responding" in task manager or any crash.
Does anyone have an Idea what I could be possibly doing wrong? Thanks in advance :)
Your answer
 
             Follow this Question
Related Questions
Multiple Cars not working 1 Answer
TextMesh/3DText modify shape 0 Answers
Distribute terrain in zones 3 Answers
How do I access built in shaders and fonts? 1 Answer
How to access a Text Mesh Pro Font Asset's glyp info from c#? 1 Answer