Duality.Resources.Font.UpdateInternalFont C# (CSharp) Method

UpdateInternalFont() private method

private UpdateInternalFont ( ) : void
return void
        private void UpdateInternalFont()
        {
            if (this.internalFont != null) this.internalFont.Dispose();
            this.internalFont = null;

            FontFamily family = GetFontFamily(this.familyName);
            if (family != null)
            {
                try
                {
                    this.internalFont = new SysDrawFont(family, this.size, this.style);
                }
                catch (Exception)
                {
                    this.internalFont = new SysDrawFont(FontFamily.GenericMonospace, this.size, this.style);
                }
            }
            else
            {
                this.internalFont = new SysDrawFont(FontFamily.GenericMonospace, this.size, this.style);
            }
        }