We use the default Juce TypeFace for our UI (‘Lucida Grande’ on OSX).
However we have switched to using ‘Noto’ (https://www.google.com/get/noto/) recently because we offer translations for our UI in Japanese, Chines etc.
The thing is, using a Font size of let’s say 12.0f will show the text at different sizes for the different TypeFaces. In this case the ‘Noto’ TypeFace will render it quite a bit smaller.
I can get around most issues by using a custom LookAndFeel and overriding getComboBoxFont, getLabelFont etc and applying a scale factor to the Font returned depending on the TypeFace being used.
I use TypeFace::getHeightToPointsFactor for this, it shows something like 0.8 for ‘Lucida Grande’ and 0.6 for ‘Noto Sans JP’. So with a translation of these values i get a long way. However i have quite a few custom Component::paint routines that do not use a LookAndFeel but still use Fonts to draw text. All these routines won’t have this magic scaling applied.
So my question is in the end, why do i have to go this length, why does Font(12.0f) not render the same text for different TypeFaces at the same size? If i can do this scaling manually why doesn’t Juce do this out of the box?
And of course if someone else has some tips and tricks regarding this issue, i would love to know.