Skip to content

Commit 2c8e0db

Browse files
authored
Merge pull request #85 from wberger/patch-2
Use fontDescriptor for instantiating a UIFont from an existing UIFont
2 parents 72aa309 + 5a1c206 commit 2c8e0db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SwiftRichString/Attributes/FontConvertible.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ extension Font: FontConvertible {
6262
#elseif os(watchOS)
6363
return Font(name: self.fontName, size: (size ?? WATCHOS_SYSTEMFONT_SIZE))!
6464
#else
65-
return Font(name: self.fontName, size: (size ?? Font.systemFontSize))!
65+
return Font(descriptor: self.fontDescriptor, size: (size ?? Font.systemFontSize))
6666
#endif
6767
}
6868

0 commit comments

Comments
 (0)