Labels with system fonts on macOS

I’ve noticed that system fonts on macOS (CCDevice-mac.mm) are loaded using:

[[NSFontManager sharedFontManager]
                fontWithFamily:fntName
                traits:NSUnboldFontMask | NSUnitalicFontMask
                weight:0
                size:size];

which does not allow to load specific members of a font family (like italic, bold, etc). Why don’t you simply use something like this:

[NSFont fontWithName:fntName size:size]

That’s the way system fonts are loaded in CCDevice-ios.mm. Not sure why you took a different approach on macOS.
Is there any other way to create a Label on macOS using a system font like, lets say, HelveticaNeue-Bold?

I’d create a GitHub issue for this and let the engineering team take a look. https://github.com/cocos2d/cocos2d-x/issues

Thanks! Could you please give me a direct link to the issue? I couldn’t find it on github within the latests issues.

I said I’d create one, not that I did create one. Sorry for the confusion. https://github.com/cocos2d/cocos2d-x/issues/16635

Sorry, I misread your answer! Though I must say that I do not understand your comments on github about this issue. I will continue the discussion there…