Update Cryville.Common.Logging.

This commit is contained in:
2023-11-20 20:21:21 +08:00
parent e2c58c708f
commit c2e94afc1c
24 changed files with 280 additions and 140 deletions

View File

@@ -8,7 +8,6 @@ using TMPro;
using UnityEngine;
using UnityEngine.TextCore.LowLevel;
using UnityEngine.TextCore.Text;
using Logger = Cryville.Common.Logging.Logger;
namespace Cryville.Common.Unity.UI {
[RequireComponent(typeof(TextMeshProUGUI))]
@@ -32,14 +31,14 @@ namespace Cryville.Common.Unity.UI {
else if (DefaultShader) ifont.material.shader = DefaultShader;
if (_font == null) {
_font = ifont;
Logger.Log("main", 1, "UI", "Using main font: {0}", typeface.FullName);
Shared.Logger.Log(1, "UI", "Using main font: {0}", typeface.FullName);
if (MaxFallbackCount <= 0) break;
}
else {
if (_font.fallbackFontAssetTable == null)
_font.fallbackFontAssetTable = new List<FontAsset>();
_font.fallbackFontAssetTable.Add(ifont);
Logger.Log("main", 1, "UI", "Using fallback font #{0}: {1}", _font.fallbackFontAssetTable.Count, typeface.FullName);
Shared.Logger.Log(1, "UI", "Using fallback font #{0}: {1}", _font.fallbackFontAssetTable.Count, typeface.FullName);
if (_font.fallbackFontAssetTable.Count >= MaxFallbackCount) break;
}
}