PDA

View Full Version : How to use <weight> property of a font in Unity



Valyar
October 3rd, 2020, 14:56
According to the API reference, there is <weight> attribute for a font. https://fantasygroundsunity.atlassian.net/wiki/spaces/FGU/pages/4162481/font
I can't find examples how to use it. I have situation where bold="true" is not respected by Unity and want to try the weight. The MS documentation how to use LOGFONT in code is not really helping. :confused:

Any examples?

Moon Wizard
October 3rd, 2020, 17:34
Only "file", "name" and "size" are supported in FGU by design. FGC was required to use LOGFONT, but FGU uses a completely different font engine. So, if you want weighting/styling changes, you should find a version of the font that already includes those option.

I'll remove those references from the documentation.

Regards,
JPG

Valyar
October 3rd, 2020, 21:35
Thanks for the clarification.