CaptchaImage.CaptchaImage.SetFamilyName C# (CSharp) Method

SetFamilyName() private method

Sets the font used for the image text.
private SetFamilyName ( string familyName ) : void
familyName string
return void
        private void SetFamilyName(string familyName)
        {
            // If the named font is not installed, default to a system font.
            try
            {
                Font font = new Font(this.familyName, 12F);
                this.familyName = familyName;
                font.Dispose();
            }
            catch (Exception ex)
            {
                this.familyName = System.Drawing.FontFamily.GenericSerif.Name;
            }
        }