Simple system font loading


#1

Hi All,

congrats for the active juce community and the project in general…! I am a newbie to juce and I wanted some guidance / directions if possible – I want to load a system font in my app and do some text rendering afterwards but I am a bit confused with the route that I should choose… I am aware of the fact that with the old juce API you could just use the
Typeface constructor in order to load and initialize all the glyphs from a named system font … Typeface (const String& faceName, const bool bold, const bool italic);

I wanted to ask what would be the best approach to achieve the same thing now that Typeface is abstract… I already had a look at the CustomTypeface class but still I am not sure what would be the way to go with the specific class …

Any help would be greatly appreciated!!

Thanks!


#2

You don’t need to use the Typeface class directly - for system fonts you can just use the Font class’s constructor to select one.


#3

Thanks for the quick response Jules!

I ll try the Font class then and see how it goes…

Thanx again!!