Add debug logs about environment and fonts.
This commit is contained in:
@@ -6,6 +6,7 @@ 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))]
|
||||
@@ -29,12 +30,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);
|
||||
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);
|
||||
if (_font.fallbackFontAssetTable.Count >= MaxFallbackCount) break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user