diff options
Diffstat (limited to 'Client/Assembly-CSharp/FontData.cs')
-rw-r--r-- | Client/Assembly-CSharp/FontData.cs | 32 |
1 files changed, 32 insertions, 0 deletions
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<Vector4> bounds = new List<Vector4>(); + + public List<Vector3> offsets = new List<Vector3>(); + + public List<Vector4> Channels = new List<Vector4>(); + + public Dictionary<int, int> charMap; + + public float LineHeight; + + public Dictionary<int, Dictionary<int, float>> kernings; + + public float GetKerning(int last, int cur) + { + Dictionary<int, float> dictionary; + float result; + if (this.kernings.TryGetValue(last, out dictionary) && dictionary.TryGetValue(cur, out result)) + { + return result; + } + return 0f; + } +} |