LookAndFeel::setDefaultSansSerifTypeface doesn't exists


#1

Hi,

The function here in the doc doesn’t exists in code. I grepped the whole JUCE library to be sure. Thought I’d report, just in case, unless I’m missing something :slight_smile:

https://docs.juce.com/master/classLookAndFeel.html#ad6764bcf3fbb1983287379f2ed034337

Cheers,

Mathieu


#2

@sigmate, I see it in juce_gui_basics/lookandfeel/juce_LookAndFeel.cpp line 137 as of JUCE v5.3.1


#3

/me bangs his head on the wall
That’s a quite recent addition, so :slight_smile: Sorry for the noise.


#4

Don’t forget to call it like this and not directly:

LookAndFeel::getDefaultLookAndFeel().setDefaultSansSerifTypefaceName(“Tahoma”);


#5

Aw yes, I learned this just before you posted :wink: Thanks a lot!


#6

Top!


#7

How come I can’t call this in the constructor of my custom LookAndFeel class?

The really weird thing is that most windows and text is ok & displays the new font correctly, except for 1 random tab in my preferences window, where “F” becomes “n” and “+” becomes “M” & “9” becomes “a”, among other issues. Other tabs are A-OK. Also this issue only occurs on Windows, but seems persistent across different machines.

But thanks for the fix, looks like it got set straight :slight_smile: