/// <summary> /// get the new fonts after the font table changed /// </summary> internal void RecalculateFonts() { if (MgFontIndex != 0) { MgFont mgFont = Manager.GetFontsTable().getFont(MgFontIndex); Font = FontsCache.GetInstance().Get(mgFont); Control c = getEditorControl(); if (c != null) { ControlUtils.SetFont(c, Font); } } }
/// <returns> the single instance of the fonts cache object</returns> internal static FontsCache GetInstance() { if (_instance == null) { // synchronize on the class object lock (typeof(FontsCache)) { if (_instance == null) { _instance = new FontsCache(); } } } return(_instance); }
/// <summary> /// /// </summary> /// <param name="obj"></param> /// <param name="value"></param> /// <returns></returns> object ConvertFontProp(object obj, object value) { Font font = value != null?FontsCache.GetInstance().Get((MgFont)value) : null; return(font); }