Custom Font setting size

Hey there ive been trying this for a few hours messing around but to no avail.

Basically here is my type face font thing in the plugineditor.h class:

static const Font& getMyFont()
    {
        static Font myFont(Font(Typeface::createSystemTypefaceFor(BinaryData::Open_24_Display_St_ttf,
            BinaryData::Open_24_Display_St_ttfSize)));
        return myFont;
    }

Im wanting to be able to change the font size on the label im using the font on, it wont let me do the typical setfont (16.0f, getmyfont()), like i would do if it wasnt a custom font, and im not sure of other ways to get around it.

i have also tried out the myFont.setSizeAndStyle(), but havent really figured it out and have no idea what kernelling is with fonts…

thanks, any help is appreciated!

I have figured it out reading some other forum posts, if anyone else ever is curious.
when calling the getmyfont() you can add in getMyFont().withHeight(ChosenSize); and it changes the size!

1 Like