浏览代码

Refactor.

/main
Yuncong Zhang 5 年前
当前提交
1ff071e9
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 6
      Runtime/ui/painting/canvas_impl.cs

6
Runtime/ui/painting/canvas_impl.cs


var subText = textBlob.text.Substring(textBlob.textOffset, textBlob.textSize);
Texture tex = null;
bool alpha = !char.IsHighSurrogate(subText[0]) && !EmojiUtils.isSingleCharEmoji(subText[0]);
if (alpha) {
bool notEmoji = !char.IsHighSurrogate(subText[0]) && !EmojiUtils.isSingleCharEmoji(subText[0]);
if (notEmoji) {
font.RequestCharactersInTextureSafe(subText, fontSizeToLoad, style.UnityFontStyle);
tex = font.material.mainTexture;
}

var layer = this._currentLayer;
if (alpha) {
if (notEmoji) {
layer.draws.Add(CanvasShader.texAlpha(layer, p, mesh, tex));
}
else {

正在加载...
取消
保存