What I've done is to set my LookAndFeel in the begining of the MainComponent constructor.
Other than that, I just overriden the getTypefaceForFont(), as mentioned above, and the drawButtonBackground().
If I set the font on every componenten separately, it works fine (the font changes).
It should work perfectly well like that, we use the same technique in various apps.
I'm actually just about to fix a related bug where embedded fonts don't draw correctly if you use an AttributedString but forget to set its font. But as long as you use them properly, it should all work OK.
I have the same problem too.
I have embed a new font named "BroadcastTitling" at the beggining of the constructor of my MainComponent.cpp but it has no effect at all.
In order to check if the problem comes from fonts, I installed it in my system (windows 10) and it works fine.
Here is a piece of code from MainComponent.cpp :
where Laf_V3 : private variable of type LookAndFeel_V3, in MainComponent.h
MainComponent::MainComponent ()
{
//[Constructor_pre] You can add your own custom stuff here..
Typeface::Ptr FontPtr = Typeface::createSystemTypefaceFor(BinaryData::BroadcastTitling_ttf, BinaryData::BroadcastTitling_ttfSize);
String Sf = FontPtr->getName();
Laf_V3.setDefaultSansSerifTypefaceName(Sf);
LookAndFeel::setDefaultLookAndFeel(&Laf_V3);
//[/Constructor_pre]
That won't work - you can't just ask for a custom typeface by name, as it won't be found by the OS, which won't know about its existence. You'd need to do like the OP and create a Font object directly from the Typeface object.
Have you tried with the latest version from today?
Someone else reported an identical problem, which turned out to be due to a completely unrelated mistake involving their use of an AttributedString. I've tightened that class up now so if that sounds like your situation, try again with the newest code..
FYI the problem I fixed was nothing to do with embedded fonts, that was just a symptom of a bug you get if you create an AttributedString but don't bother specifying its font.
Even though it seems to work for you now, you probably still should fix your code so that you specify a font for your AttributedString, otherwise they're just using some arbitrary default size, which probably isn't what you want.
I tested my app, with various fonts that they not installed in the system (windows 10).
It seems that everything works fine.
I would assume (fully knowing to whom I say this) that somewhere deeply in Juce, the two issues (embedded fonts and Attributedstring) ends up in a same common procedure.
I attempted twice to follow the sequence of the two procedures through debugger, but I lost the control and I stopped the try. Sorry...
In any case I will observe the behaviour of my app and I will inform you for any change.
I think the OP will take the same care.