Not sure if this is the correct area, but it seemed like it was! I’m working on a translation editor system that allows a user to frontload all the text settings before/within the game, using an external translations file. One of the things I want to integrate is a Markup field that allows the user to modify the fontStyle attribute to make use of Bold, Italic, or BoldAndItalic.
I’ve been trying to find out what happens if a font does not support Bold, for example. It’s looking like nothing will happen if this isn’t supported, but is there a way for me to test that it is supported before I populate the drop down list to give the user the option in the first place? Any help would be much appreciated!
Not sure if this helps and you’d be better off researching how word processors know what fonts have bold etc but…
My font folder has my fonts listed with a suffix that says whether they are bold or not.
ARIAL.TTF = Normal
ARIALBD.TTF = Bold
It’s not perfect as I’ve noticed Agency FB’s file name for bold is AGENCYB (arial is using BD instead)…
But…
It does look like the “Font Name” is structured
Arial = Normal
Arial Bold = Bold
Agency FB = Normal
Agency FB Bold = Bold
Arial Narrow = Normal
Arial Narrow Bold = Bold
So maybe you can do a dodgy and just read the Font Names to determine which ones support bold, you need to convert this code to C# to get the font name: