Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static class GlobalFontCollection
- {
- public static PrivateFontCollection PFCollection = new PrivateFontCollection();
- private static Dictionary<string, int> FontsFiles = new Dictionary<string, int>();
- public static void AddFont(string FileName)
- {
- if (FontsFiles.ContainsKey(FileName)) return;
- PFCollection.AddFontFile(FileName);
- FontsFiles.Add(FileName, PFCollection.Families.Length - 1);
- }
- public static int GetIndex(string FileName)
- {
- if (!FontsFiles.ContainsKey(FileName)) return -1;
- return FontsFiles[FileName];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement