- Home /
Specifying the font of individual characters at runtime
Over in this thread, I learned how to change the color of individual text characters in a Text object at runtime. Now I'm wondering if I can change the font of individual text characters in a Text object at runtime.
(Why? I'm implementing a console-like user feedback system, and I would like the first character of each console line to be an icon from a web-dings font -- speech bubble icon, triangle warning icon, stop-sign error icon, etc. -- and then the rest of the text to continue in the console Text field's default font.)
I have tried the examples below and they don't work; they just print out the tags as if regular text. In these examples, the name of the font I want to use, as shown in the Assets folder, is "modernpics", and the character that creates the right icon is the letter b:
FeedbackConsole.text = "<font=\"modernpics\">b</font> INFORMATION: " + feedbackMessage;
FeedbackConsole.text = "<font=modernpics>b</font> INFORMATION: " + feedbackMessage;
Thanks for any help.
Your answer
Follow this Question
Related Questions
Some Text Is Blurry Some Text Is Not 4 Answers
Custom Font works in editor but not in build 2 Answers
Fonts for commercial mobile game (Android) 1 Answer
Outer glow (outline) on a Text Mesh 0 Answers
Getting pixel font to look decent 1 Answer