How To Load TTF Font From External File
I feel like this is a really niche need, but it's something I really want to have in the final product.
I need a way to load a font from an external file with C#.
The idea is the user of the program can load custom font files, which can be assigned to different text UI components throughout the scene.
This is important because I'm working on a conlang design program, and a lot of conlang authors like to create custom font files to show their glyphs and letters that they made for the language.
I can't have the TTF file stored as an asset in resources, and I can't have it imported from a server through WWW or anything. It has to be loaded from somewhere on the hard drive, outside of an asset pack. I'm not the one creating the TTF files or loading them, once this program is distributed.
Everything I've found on the forums and in the manual requires the font to be an asset.
All help would be appreciated. If this is completely impossible, then I'd like someone to let me know as well.
Hello, were you able do that? I need to do exactly the same thing and I'm stuck as well. :(
Unfortunately not. I did a lot of searching.
Theoretically, if I knew the structure of Font objects in Unity, and how TTF fonts are structured, I could use my own methods or imported methods to get the job done, but I'm pretty sure we don't have access to Unity's internal workings on that level.
I'll be honest: After day 5, I didn't think anybody saw this question, lol.
For now, it's very common for conlangers to romanize their languages, so I'll have to ride on that for now.
Thanks for the quick response. Yeah, I might be working with bitmap fonts ins$$anonymous$$d, at least for the moment. Have you tried this approach? It is not ideal but allows for using custom fonts at least.
Your answer
Follow this Question
Related Questions
I can't change Text color 3 Answers
Text Objects do Lerp 0 Answers
UI Text created from C# Script 0 Answers
How to do Ammo UI in Unity 5.3.4?,How to do Ammo UI in Unity 5 1 Answer
ui.text string matching doesn't work 0 Answers