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 font: UIFont?
|
||||||
|
|
||||||
var fontAttributes = fontAttributes
|
var fontAttributes = fontAttributes
|
||||||
|
let initialFontAttributes = fontAttributes
|
||||||
var isQuote = false
|
var isQuote = false
|
||||||
if fontAttributes.contains(.blockQuote) {
|
if fontAttributes.contains(.blockQuote) {
|
||||||
isQuote = true
|
isQuote = true
|
||||||
@ -278,10 +279,10 @@ public func stringWithAppliedEntities(_ text: String, entities: [MessageTextEnti
|
|||||||
font = boldItalicFont
|
font = boldItalicFont
|
||||||
} else if fontAttributes == [.bold] {
|
} else if fontAttributes == [.bold] {
|
||||||
font = boldFont
|
font = boldFont
|
||||||
addedAttributes.append((range, fontAttributes))
|
addedAttributes.append((range, initialFontAttributes))
|
||||||
} else if fontAttributes == [.italic] {
|
} else if fontAttributes == [.italic] {
|
||||||
font = italicFont
|
font = italicFont
|
||||||
addedAttributes.append((range, fontAttributes))
|
addedAttributes.append((range, initialFontAttributes))
|
||||||
} else {
|
} else {
|
||||||
font = baseFont
|
font = baseFont
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user