macOS Monterey partition missing "SF Pro Text" font

I want to use the "SF Pro Text" font in my app. It works fine when I build my app on my main computer running macOS11 Big Sur, but I have a 2nd partition to run macOS Monterey, and it doesn't seem to be available there at all, whether through Interface Builder or through code (using NSFontManager).

Using this returns nil on my Monterey partition:

NSFont* regularFont = [[NSFontManager sharedFontManager] fontWithFamily:@"SF Pro Text" traits:NSFontWeightRegular weight:5 size: 16.0];

Maybe I'm missing something here ... should I have to install the font manually? I thought the SF Font is a 'system font', so it would be available on all Macs?

It appears Apple has restricted getting SF font by name in latest OS release. Use System Font APIs instead.

NSFont has the following methods (amongst others):

systemFont(ofSize:)

preferredFont(forTextStyle:options:)

Hope this helps.

Doug Hill

https://github.com/djfitz/SFFontFeatures

macOS Monterey partition missing "SF Pro Text" font
 
 
Q