Compare commits
1 Commits
compose-re
...
develop
Author | SHA1 | Date |
---|---|---|
Shadowfacts | 01cf597b5d |
|
@ -30,7 +30,9 @@ class AccountDisplayAndUserNameLabel: EmojiLabel {
|
|||
|
||||
private func makeAttributedText(state: State) -> NSAttributedString {
|
||||
let s = NSMutableAttributedString()
|
||||
s.append(NSAttributedString(string: state.displayName, attributes: [
|
||||
// U+2068 FIRST-STRONG ISOLATE and U+2069 POP DIRECTIONAL ISOLATE
|
||||
// to prevent bidi text in the display name influencing the username
|
||||
s.append(NSAttributedString(string: "\u{2068}\(state.displayName)\u{2069}", attributes: [
|
||||
.font: UIFont(descriptor: baseFont.addingAttributes([
|
||||
.traits: [
|
||||
UIFontDescriptor.TraitKey.weight: UIFont.Weight.semibold.rawValue,
|
||||
|
|
Loading…
Reference in New Issue