Font weight

I’m working with a graphic designer that uses different values of font weight (300, 500 etc) and I can’t find any control over it in juce::Font expect plain and bold, am I missing something?

I think that the safest approach would be to embed your own fonts with your desired weight.

Thanks, the font I need is “Helvetica Neue” which is already installed, but I can’t see any way to reach the 500 weight, only plain (400) and bold (700).
This is by the Font::FontStyleFlags

You might need to select the typeface name which already corresponds to your desired weight (e.g. “Helvetica Neue Regular” or “Helvetica Neue Medium”).

Juce should support variable fonts nowadays, should be pretty easy to support on top of freetype library and maybe harfbuzz for ligatures as well. Variable fonts should allow for seamless font weight changes using a single ttf

Thanks! That did the trick.

1 Like