Clint1459 wrote:
do you have any idea what field FontDoctor might be looking at to come up with "plain"
None.
I went through the code on Cabin Bold, Regular, and Medium, and none of them have the word "plain" in any of their name fields
You're right, I checked it too. I was quite wrong about that. I surmise now that Font Doctor uses Plain for anything that's not Bold, Italic, etc. Since I couldn't be sure about that, I gave up on FD, and I used ftxdumperfuser from Apple's font tools suite.
I've figured out a universally consistent pattern to how Font Book picks the default face. I think it's based on the nameID=2 field (that's the Subfamily or Face field)
Or Style. Yes, I believe you've got it; it's as I suspected above.
prioritizes them this way:
1. "Book"
2. "Medium"
3. "Regular"
4. If none of the above exact matches are found, it picks the first font in the list.
1–3, yes. 4, not quite. Here's how I tested it.
First, I had a quick, rough peek at Font Book's code. It seems that five words have special meaning:
- Medium
- Book
- Roman
- Plain
- Regular
(Sorry, Kurt, Normal isn't there. There's W3 and W6, but that's for Japanese fonts, so I ignored them.)
Second, I used ftxdumperfuser to change the subfamily name (only) in the Cabin faces according to this list, then I checked how Font Book picked up the representative face. The result was,
- Book
- Medium
- Regular
- Plain
- Roman
So 1–3 is exactly as you determined; 4 and 5 may seem alphabetical -- but if other faces are added, Plain or Roman are chosen before them.
Of course, that's not definitive, but I think it's enough to make a case.