I am using a custom font in an iOS app. I have added the font file for the regular variant. However, I do not have the bold font file.
Is it possible to increase the boldness of a font without having the bold font file?
I am using a custom font in an iOS app. I have added the font file for the regular variant. However, I do not have the bold font file.
Is it possible to increase the boldness of a font without having the bold font file?
You can use an NSAttributedString
with a negative strokeWidth
attribute:
let range = NSRange(location: 0, length: attributedString.length
attributedString.addAttribute(.strokeWidth, value: NSNumber(value: -3.0), range: range))