TextButton Font


Hi, since i’m using newest SVN version of Juce, I got an impossibility to get text in TextButton,
in that particular case :

when i overwrite getfont to use my own font in a Textbutton class of my own :

const Font getFont() { return s_FONT_WEBDINGS; }e.g.

:twisted: what changed ?



Before posting did you actually look at the TextButton code to see if anything has changed? Did you step through TextButton::paint in the debugger to see what’s happening? Did you look more closely at your own code to see if it was declared correctly?


Yes, i did. The getfont method did note change, the paint no more, i tried to see in Font.class, nothing changed at my eyes, then it carries me too far from my occupations, sir.

NB : the trouble comes with WEBDINGS and WINGDINGS font only… with Helevetica and so on it’s ok.


Well, that’s the vital clue. 1.46 used a completely different font loading API, so it’s quite likely that the names won’t be parsed in an identical way and the exact format of the name you’re using could have changed. I wouldn’t really recommend using hard-coded font names for this kind of reason…


what means “hard-coded” ?
• symbol fonts ?


I mean actually putting a string like “wingdings” in your app, rather than making it choose a name from the list of available fonts.


Ok ta.
Whatever the shame on me cause I used these fonts to draw symbols on button (as play/stop/circles…).