my first question is the font problem.
I want the components could support Chinese character display, but I couldn’t find a good place to modify the components’ font.
the button component:
/** This can be overridden to use different fonts than the default one.
Note that you'll need to set the font's size appropriately, too.
virtual const Font getFont();
it seems I could modify the font here, I write a derived class TestTextButton override getFont and it works.
but when I check LookAndFeel::drawPopupMenuItem()method, the getPopupMenuFont() method is a member of LookAndFeel,
if I want to modify the font I could modify LookAndFeel, not derive a popupmenu class.
const Font LookAndFeel::getPopupMenuFont()
return Font (17.0f);
I try to modify the Font class’s constructor, so the default typefacename will be other font that support Chinese, but I modify
const String Font::getDefaultSansSerifFontName() throw()
static const String name ("<Sans-Serif>");//modify here with "<宋体>"
but it doesn’t work.
so, is there a better method to modify the components’ font, or in a general way?
what can I do to change the font?
which is better?