Set weight for bold fonts
This commit is contained in:
parent
d47767d8b4
commit
406a8e0cc0
|
@ -223,6 +223,9 @@ extension NSAttributedString {
|
|||
var symbolicTraits = currentDescriptor.symbolicTraits
|
||||
|
||||
if styles.contains(.bold) {
|
||||
let traits: [FontDescriptor.TraitKey: Any] = [.weight: Font.Weight.bold]
|
||||
let attributes: [FontDescriptor.AttributeName: Any] = [.traits: traits]
|
||||
descriptor = descriptor.addingAttributes(attributes)
|
||||
symbolicTraits.insert(boldTrait)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue