/// <summary> /// Create font. This should be used for creation instead of EditorFont constructor /// </summary> /// <param name="font"></param> /// <returns></returns> public EditorFont CreateFont(Font font) { EditorFont newFont; newFont = FindFont(font.Name, font.Style); if (newFont == null) { newFont = new EditorFont(font); this.fonts.Add(newFont); } return newFont; }
/// <summary> /// Create font. This should be used for creation instead of EditorFont constructor /// </summary> /// <param name="font"></param> /// <returns></returns> public EditorFont CreateFont(Font font) { EditorFont newFont; newFont = FindFont(font.Name, font.Style); if (newFont == null) { newFont = new EditorFont(font); this.fonts.Add(newFont); } return(newFont); }
/// <summary> /// Load all fonts. Element must be <Fonts> node /// </summary> /// <param name="element"></param> public void Load(System.Xml.XmlNode element) { if (element.Name == "Fonts") { XmlNodeList fontNodes = element.SelectNodes("Font"); foreach (XmlNode fontNode in fontNodes) { EditorFont newFont = new EditorFont(); newFont.Load(fontNode); this.fonts.Add(newFont); } } }