Skip to content

Commit d13089f

Browse files
committed
#44 Fixed missing font attributes while rendering StyleGroup
1 parent 791ae49 commit d13089f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/SwiftRichString/Style/StyleGroup.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,9 @@ public class StyleGroup: StyleProtocol {
242242

243243
let location = tag.range.location
244244
let length = closingTag.range.location-location
245-
attrStr.addAttributes(attribute.attributes, range: NSRange(location: location, length: length))
245+
let range = NSRange(location: location, length: length)
246+
attribute.fontData?.addAttributes(to: attrStr, range: range)
247+
attrStr.addAttributes(attribute.attributes, range: range)
246248
}
247249
}
248250

0 commit comments

Comments
 (0)