Hi, having trouble loading a TTF font. This is the code I’m using:
m_p_typeface = Typeface::createSystemTypefaceFor( BinaryData::NunitoRegular_ttf, BinaryData::NunitoRegular_ttfSize );
String name = m_p_typeface->getName();
jassert( name.isNotEmpty() );
LookAndFeel::getDefaultLookAndFeel().setDefaultSansSerifTypefaceName( name );
But it has no effect. If I create a font from the typeface and set it individually on a component, it does work, but I don’t want to have to set each element individually.
Where is m_p_typeface declared and what is its lifetime? You’ll also need to repaint the components after calling LookAndFeel:: setDefaultSansSerifTypefaceName() to see the change.