/// <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); } }
/// <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); } }