LookAndFeel_V3, TabbedComponent and embedded font



Hi Jules and every-one, 

This is my first post here so thanks a lot Jules for making this great multiplateform libray open-source and free to use for open-source project. :)

My problem is that i have corrupted text displayed in the tab component as visible in the attachement (LFv3.png)

The problem only occurs with windows 7 (macos 10.9 works fine, ubuntu 13.04 also).

I use a custom look and field that overrides "getTypefaceForFont(const Font &)" and that inherits from LookAndFeel_V3.

. If i don't overide getTypefaceForFont() the tabs shows up correctly with the default Juce/System font.
. If i inherits from LookAndFeel_V2, the tabs shows up correctly with my embeded font as visible in the attachment (LFv2.png).

Thanks a lot for any help,







FYI, I Found a workaround.

I override  drawTabButton (TabBarButton& button, Graphics& g, bool isMouseOver, bool isMouseDown)

in my L&F class.

I copied and passed the code from LookAndFeel_V3.drawTabButton(...) and replaced the TextLayout part at the end of this function by :

    g.setColour (col);
    g.setFont (Font (depth * .5));
    g.drawFittedText (button.getName().trim(), 0, 0,length, depth, Justification::centred, 1);

And the text is now OK in with the "winwdows/tabbedComponent/Embedded font" combination.