Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.

Commit 86011ae

Browse files
author
Yuncong Zhang
committed
Fix issue.
1 parent 952ece9 commit 86011ae

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Runtime/painting/text_span.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ public void build(ParagraphBuilder builder, float textScaleFactor = 1.0f) {
3434
if (hasStyle) {
3535
builder.pushStyle(this.style, textScaleFactor);
3636
}
37+
3738
if (this.splitedText != null) {
38-
if (this.splitedText.Count == 1 && !char.IsHighSurrogate(this.splitedText[0][0])) {
39+
if (this.splitedText.Count == 1 && !char.IsHighSurrogate(this.splitedText[0][0]) &&
40+
!EmojiUtils.isSingleCharEmoji(this.splitedText[0][0])) {
3941
builder.addText(this.splitedText[0]);
4042
}
4143
else {
@@ -47,7 +49,7 @@ public void build(ParagraphBuilder builder, float textScaleFactor = 1.0f) {
4749
}
4850
}
4951
}
50-
52+
5153

5254
if (this.children != null) {
5355
foreach (var child in this.children) {
@@ -69,6 +71,7 @@ public bool hasHoverRecognizer {
6971
need = true;
7072
return false;
7173
}
74+
7275
return true;
7376
});
7477
return need;
@@ -186,7 +189,7 @@ public RenderComparison compareTo(TextSpan other) {
186189
if (!Equals(this.hoverRecognizer, other.hoverRecognizer)) {
187190
result = RenderComparison.function > result ? RenderComparison.function : result;
188191
}
189-
192+
190193
if (this.style != null) {
191194
var candidate = this.style.compareTo(other.style);
192195
if (candidate > result) {

0 commit comments

Comments
 (0)