To make the things clear, here’s an example for the American Typewriter Font family:
American Typewriter
American Typewriter Light
American Typewriter Semibold
American Typewriter Bold
American Typewriter Condensed
American Typewriter Condensed Light
American Typewriter Condensed Bold
Here start the troubles with Xojo / macOS.
There is no more (since years) Styles (Bold, Italic, etc.) in macOS.
You directly use the Family Member you want (American Typewriter Bold for example).
Also, try with XPress to apply the Bold Style to a Text when the set Font is (for example) American Typewriter Bold. At print time (or pdf generation time), you will get a warning and the application stop until you understand and correct your error.
I read the documlentation (Styled Text) and it says too use the styles (.SelectedBold for example).
This needs some work because of all I wrote above and…:
When you install a Font Menu, you will get all Family Member as individual entries (real the names of the individual entries of the American Typewriter Font far above.
Apple’s TextEdit application shows:
And that is clear: Family Name (Famille) on the left and Family Members (Police de caractères [!]) on the right.
From my French macOS (Big Sur).
Excepted if I overlook something, Xojo does not know - yet - the Family Name / Family Members concept.
What I actually do is to display a window with ONE ListBox and:
Sub Open() Handles Open
Dim i As Integer
Dim Font_Count As Integer = FontCount - 1
For i = 0 To Font_Count
LB_Fonts.AddRow(Font(i))
Next
End Sub
and I get the list of all Family Members in the ListBox and that gave me 573 entries (default entries; remove 1 because I added 1 Font to my System, minutes ago).
That is… who (a) can deal with so many Font entries ?
(a) what user can deal…
Fortunately, I do not added a Font Menu !
The solution Apple used for TextEdit is displayed above: a list of the Family Names and a second list of the Family Members. How can we do that in pure (no plug-in) Xojo ?
More information available TrueType-Reference-Manual (Chapter 6: Name).