mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix font attributes
This commit is contained in:
parent
2ae69b577f
commit
74042f17f0
@ -269,6 +269,7 @@ public func stringWithAppliedEntities(_ text: String, entities: [MessageTextEnti
|
||||
var font: UIFont?
|
||||
|
||||
var fontAttributes = fontAttributes
|
||||
let initialFontAttributes = fontAttributes
|
||||
var isQuote = false
|
||||
if fontAttributes.contains(.blockQuote) {
|
||||
isQuote = true
|
||||
@ -278,10 +279,10 @@ public func stringWithAppliedEntities(_ text: String, entities: [MessageTextEnti
|
||||
font = boldItalicFont
|
||||
} else if fontAttributes == [.bold] {
|
||||
font = boldFont
|
||||
addedAttributes.append((range, fontAttributes))
|
||||
addedAttributes.append((range, initialFontAttributes))
|
||||
} else if fontAttributes == [.italic] {
|
||||
font = italicFont
|
||||
addedAttributes.append((range, fontAttributes))
|
||||
addedAttributes.append((range, initialFontAttributes))
|
||||
} else {
|
||||
font = baseFont
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user