- Home /
How can I create Font objects at runtime?
Hi Everyone!
I'm looking for a way to grab a .ttf file from StreamingAssets and use it as a Font object for my UI.Text components.
I need this to be created at run time because I've built an editor in Unity which allows users access to their installed system fonts. The editor then packages a config file into a player application (also a unity app) to be played back on other machines. Trouble is, the other machines might not have the installed system font used by the initial editor and referenced by said config.
I'd like to be able to access the same sort of functionality of importing a font into my project, but on the fly. Any ideas?
So far my only avenue seems to be to ship the font with the player app and somehow install the font locally when the player notices it isn't installed. But I'd like a less clunky solution for sure.
Also, target platform is windows 7 and 8.
Your answer
Follow this Question
Related Questions
Use Windows Fonts in Game 1 Answer
Font Render Issue Unity 5.3.4f1 on Samsung devices 1 Answer
UI Canvas not visible (but is active) in 32 bit windows build, but is visible in 64 bit build 1 Answer
Blurry fonts, even when using DX11 0 Answers
How to access a Text Mesh Pro Font Asset's glyp info from c#? 1 Answer