浏览代码

Fix emoji size.

/main
Yuncong Zhang 5 年前
当前提交
d90e07df
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. 2
      Runtime/ui/txt/emoji.cs
  2. 6
      Runtime/ui/txt/layout.cs

2
Runtime/ui/txt/emoji.cs


public const int colCount = 37;
public static Rect getMinMaxRect(float fontSize, float ascent, float descent) {
return Rect.fromLTWH(fontSize * 0.05f, descent - fontSize, fontSize * 0.9f, fontSize * 0.9f);
return Rect.fromLTWH(0, descent/2-fontSize, fontSize, fontSize);
}
public static Rect getUVRect(int code) {

6
Runtime/ui/txt/layout.cs


var minX = x;
var maxX = metrics.descent - metrics.ascent + x;
var minY = metrics.ascent;
var maxY = metrics.descent;
var maxX = style.fontSize + x;
var minY = metrics.descentn><span class="p">/2 - style.fontSize;
var maxY = metrics.descent/2;
_updateBounds(minX, maxX, minY, maxY, ref bounds);
positions[i] = x;

正在加载...
取消
保存