Why can not change font height?

I override lookandfeel method getTypefaceForFont to use a new typeface name, and I also want to change the font height to a big size,but it doesn’t work. Is there a simple way to change all component’s font in UI ? Thanks.

Font in which Component(s)?

Rail

I just want to big size of font in apperance,for all components in UI,thanks.

well Component::paint() is simply:

void Component::paint (Graphics&)
{
    // if your component is marked as opaque, you must implement a paint
    // method and ensure that its entire area is completely painted.
    jassert (getBounds().isEmpty() || ! isOpaque());
}

If you wanted to have a generic L&F for your own Component derived classes you’ll have to add that yourself and get the font in your Components’ paint() method. Some JUCE (derived) Components may already use the L&F for their Font… but you should look at the source code for each of their paint() methods to check.

Rail

This way need change too many code, can I oerride L&F some method to change font size for all ui components display,just like in windows system I change apperance font size, all applications’s font changed.

Maybe just add a global scale factor to the entire UI, rather than trying to change the font size?

Forcing the fonts themselves to be bigger or smaller would mean that they won’t fit properly in the various widgets.