daily pastebin goal
8%
SHARE
TWEET

GlobalFontCollection

tolikpunkoff Mar 16th, 2018 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     public static class GlobalFontCollection
  2.     {
  3.         public static PrivateFontCollection PFCollection = new PrivateFontCollection();
  4.         private static Dictionary<string, int> FontsFiles = new Dictionary<string, int>();
  5.  
  6.         public static void AddFont(string FileName)
  7.         {
  8.             if (FontsFiles.ContainsKey(FileName)) return;
  9.  
  10.             PFCollection.AddFontFile(FileName);
  11.             FontsFiles.Add(FileName, PFCollection.Families.Length - 1);
  12.         }
  13.         public static int GetIndex(string FileName)
  14.         {
  15.             if (!FontsFiles.ContainsKey(FileName)) return -1;
  16.             return FontsFiles[FileName];
  17.         }
RAW Paste Data
Top