浏览代码

rename

/main
fzhangtj 6 年前
当前提交
6c55ab14
共有 4 个文件被更改,包括 4 次插入4 次删除
  1. 2
      Runtime/ui/painting/txt/font_manager.cs
  2. 2
      Runtime/ui/painting/txt/mesh_generator.cs
  3. 2
      Runtime/ui/txt/layout.cs
  4. 2
      Runtime/ui/txt/linebreaker.cs

2
Runtime/ui/painting/txt/font_manager.cs


public static class FontExtension
{
public static CharacterInfo MustGetCharacterInfo(this Font font, char ch, int fontSize, UnityEngine.FontStyle fontStyle)
public static CharacterInfo mustGetCharacterInfo(this Font font, char ch, int fontSize, UnityEngine.FontStyle fontStyle)
{
CharacterInfo info;
bool success = font.GetCharacterInfo(ch, out info, fontSize, fontStyle);

2
Runtime/ui/painting/txt/mesh_generator.cs


continue;
}
CharacterInfo charInfo = font.MustGetCharacterInfo(ch, fontSizeToLoad, style.UnityFontStyle);
CharacterInfo charInfo = font.mustGetCharacterInfo(ch, fontSizeToLoad, style.UnityFontStyle);
var minX = charInfo.minX / this._scale;
var maxX = charInfo.maxX / this._scale;
var minY = charInfo.minY / this._scale;

2
Runtime/ui/txt/layout.cs


for (int i = 0; i < count; i++) {
int charIndex = start + i;
var ch = text[charIndex];
CharacterInfo characterInfo = font.MustGetCharacterInfo(ch, style.UnityFontSize, style.UnityFontStyle);
CharacterInfo characterInfo = font.mustGetCharacterInfo(ch, style.UnityFontSize, style.UnityFontStyle);
var rect = Rect.fromLTRB(characterInfo.minX, -characterInfo.maxY, characterInfo.maxX,
-characterInfo.minY);

2
Runtime/ui/txt/linebreaker.cs


if (this._tabWidth == int.MaxValue) {
this._font.RequestCharactersInTexture(" ", this._fontSize);
CharacterInfo characterInfo = this._font.MustGetCharacterInfo(' ', this._fontSize, UnityEngine.FontStyle.Normal);
CharacterInfo characterInfo = this._font.mustGetCharacterInfo(' ', this._fontSize, UnityEngine.FontStyle.Normal);
this._tabWidth = characterInfo.advance * kTabSpaceCount;
}

正在加载...
取消
保存