#define global font

Is this the proper use or is there a better way…

in myComponents.hpp

namespace myComponents {

#define FONT APP->window->loadFont(asset::plugin(pluginInstance, "whateverpath"))
...

}

It works, but only tested on windows.

That works and is similar to what I do. You could save the font object in a member field initialized in the constructor if you wish.

1 Like

Had the same declaration in multiple places :upside_down_face:, cheers!