summaryrefslogtreecommitdiff
path: root/Client/Assembly-CSharp/FontData.cs
blob: 896d74c529c569afa145a170fd2d4ccc0af1dc54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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;
	}
}