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

Commit d457f82

Browse files
author
Yuncong Zhang
committed
Refactor.
1 parent 4625642 commit d457f82

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Runtime/ui/painting/canvas_impl.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -752,8 +752,8 @@ void _drawTextBlob(TextBlob textBlob, Offset offset, Paint paint) {
752752
var subText = textBlob.text.Substring(textBlob.textOffset, textBlob.textSize);
753753

754754
Texture tex = null;
755-
bool alpha = !char.IsHighSurrogate(subText[0]) && !EmojiUtils.isSingleCharEmoji(subText[0]);
756-
if (alpha) {
755+
bool notEmoji = !char.IsHighSurrogate(subText[0]) && !EmojiUtils.isSingleCharEmoji(subText[0]);
756+
if (notEmoji) {
757757
font.RequestCharactersInTextureSafe(subText, fontSizeToLoad, style.UnityFontStyle);
758758
tex = font.material.mainTexture;
759759
}
@@ -765,7 +765,7 @@ void _drawTextBlob(TextBlob textBlob, Offset offset, Paint paint) {
765765

766766
var layer = this._currentLayer;
767767

768-
if (alpha) {
768+
if (notEmoji) {
769769
layer.draws.Add(CanvasShader.texAlpha(layer, p, mesh, tex));
770770
}
771771
else {

0 commit comments

Comments
 (0)