Exemple #1
0
 /// <summary>
 ///     Restore default font
 /// </summary>
 /// <param name="key">Font key</param>
 public static void RestoreDefaultFont(string key)
 {
     CustomFonts[key] = new CustomFontData()
     {
         IsUsingCustomFont = false,
     };
     SaveSettings(key, key);
     foreach (var text in _textReferences)
     {
         text.Value.UseCustomFontImmediate(text.Value.DefaultFont);
     }
 }
Exemple #2
0
 /// <summary>
 ///     Apply provided font to font key group
 /// </summary>
 /// <param name="key">Font key</param>
 /// <param name="fontToUse">Font to apply</param>
 public static void ApplyCustomFont(string key, Font fontToUse)
 {
     CustomFonts[key] = new CustomFontData()
     {
         CustomFont        = fontToUse,
         IsUsingCustomFont = true,
     };
     SaveSettings(key, fontToUse.name);
     foreach (var text in _textReferences)
     {
         text.Value.UseCustomFontImmediate(fontToUse);
     }
 }