Home | Documentation | Atomic Chat | Github

TurboBadger AddFont in C#



I’m trying to get another font going for TurboBadger, so that I can use something else than Vera.

I’ve been digging and found this in C++:

Seems fairly easy, just have to provide the path and give it a name, right? :stuck_out_tongue:

I then found AddFont in the C# API, but I can’t access it in my C# script inside of Atomic. I’m trying to fetch the method with UI.AddFont(), but no such thing seems to exist.

Hasn’t it been implemented in C# yet or what’s the cause of this? :eyeglasses:


AddFont is not a static method, you’ll need to:

var ui = GetSubsystem<UI>();
ui.AddFont("Fonts/myfont.ttf", "MyFont");

Note that you can call GetSubsystem from within any Atomic object, you do not need to preface it with AtomicNET, the later is for accessing subsystems outside of the object model.


I see! Works like a charm now.
Thanks for the help!