You should not do this, and indeed you cannot without subclassing NSAlert
, or creating a generic window yourself. The alert can only be given a plain string, which does not include decoration information (you would need an NSAttributedString
for that); it will do its own bolding of the text you pass.
What you can and should do is have a look at "Alerts" in the HIG, and see that there are two strings you can supply to your alert: the "message text", which will be displayed in a bold font, and the "informative text". Make use of those to achieve a result consistent with the platform guidelines and your needs.