From e9ea621b93fbb58d9edfca8375918791637bbd52 Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 30 Dec 2020 20:59:04 +0800 Subject: +init --- Client/Assembly-CSharp/FontData.cs | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Client/Assembly-CSharp/FontData.cs (limited to 'Client/Assembly-CSharp/FontData.cs') diff --git a/Client/Assembly-CSharp/FontData.cs b/Client/Assembly-CSharp/FontData.cs new file mode 100644 index 0000000..896d74c --- /dev/null +++ b/Client/Assembly-CSharp/FontData.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +[Serializable] +public class FontData +{ + public Vector2 TextureSize = new Vector2(256f, 256f); + + public List bounds = new List(); + + public List offsets = new List(); + + public List Channels = new List(); + + public Dictionary charMap; + + public float LineHeight; + + public Dictionary> kernings; + + public float GetKerning(int last, int cur) + { + Dictionary dictionary; + float result; + if (this.kernings.TryGetValue(last, out dictionary) && dictionary.TryGetValue(cur, out result)) + { + return result; + } + return 0f; + } +} -- cgit v1.1-26-g67d0