Whats the best way to make a string bold?

I need to make some text bold-condensed, without knowing the font name.

Is it ok to use font manager’s methods or is there a better way to do this?

use framework "Foundation"
use framework "AppKit"
use scripting additions

## define the font for this exemple
set theFont to current application's NSFont's fontWithName:"Myriad Pro" |size|:80.0

## add traits to font
set theFont to current application's NSFontManager's sharedFontManager()'s convertFont:theFont toHaveTrait:2 --(current application's NSBoldFontMask)
set theFont to current application's NSFontManager's sharedFontManager()'s convertFont:theFont toHaveTrait:64 --(current application's NSCondensedFontMask)

## this won't set the condensed attribute in 10.13
--set fontManager to current application's NSFontManager's sharedFontManager()
--set theFont to (fontManager's fontWithFamily:"Myriad Pro" traits:66 weight:0 |size|:80)

## define the font color
set foreColor to current application's NSDictionary's dictionaryWithObject:(current application's NSColor's blueColor()) forKey:(current application's NSForegroundColorAttributeName)

## make a paragraph style and attributed string
set theStyle to current application's NSParagraphStyle's defaultParagraphStyle()'s mutableCopy()
theStyle's setLineHeightMultiple:0.96
set theAtts to current application's NSMutableDictionary's dictionaryWithObjects:{theStyle, theFont} forKeys:{current application's NSParagraphStyleAttributeName, (current application's NSFontAttributeName)}
theAtts's addEntriesFromDictionary:foreColor
return current application's NSMutableAttributedString's alloc()'s initWithString:"Some text" attributes:theAtts

That’s what the -convertFont:toHaveTrait: method is for.

Thanks. I feel reassured.
I was afraid this method would take too much resources.