What is the best practice to load fonts in ImGUI? I have the issue with some fonts (OTF or TTF) not loading at all. Maybe it’s because I can‘t address excactly the right font style (fe. Medium or Light) via the Font Config node.
I believe it’s not the font itself, but the type of font. You are talking about font families by the sounds of it (those that have multiple styles). Those don’t seem to work well in some programs that are not designed to deal with font families.
I think it might just be the dynamic enum for the fonts which shows font families and not fonts.
Take Univers for example. If I look in fonts they are actually 11 fonts, each with their own font styles. But the enum only shows the font family and not the individual fonts:
So I think it’s the enum just using font family names instead of fonts.
Proper design tools like Affinity Designer for example correctly show the font family and it’s contents:
Since there is only one dropdown for fonts it should show the fonts and not font families. I believe the fonts dynamic enum is not built correctly then…
Pretty sure something is not done correctly here: VL.StandardLibs/VL.CoreLib/src/Text/FontListEnum.cs at b01da1dac98f28a6bd1bb3d44d15d7978246189a · vvvv/VL.StandardLibs · GitHub
If you get the Font families from InstalledFontCollection, you can see it shows all the font families individually and not combined:
Just tested this some more and if I select a font family with many fonts inside it like that Universe font in my example, fontConfig in ImGui doesn’t output anything. I would therefore class this a bug and not just an inconvinience.
I noticed it is also a problem with most Google Fonts, which are often very large families and are used a lot.
Filed a GitHub issue here: FontListEnum doesn't recognise font families correctly · Issue #693 · vvvv/VL.StandardLibs · GitHub
See my comment in linked github issue.