ImageProcessor.Processors.Watermark.GetFont C# (CSharp) Method

GetFont() private method

Returns the correct T:System.Drawing.Font for the given parameters.
private GetFont ( FontFamily fontFamily, int fontSize, FontStyle fontStyle ) : Font
fontFamily System.Drawing.FontFamily /// The name of the font. ///
fontSize int /// The font size. ///
fontStyle FontStyle /// The style. ///
return System.Drawing.Font
        private Font GetFont(FontFamily fontFamily, int fontSize, FontStyle fontStyle)
        {
            try
            {
                using (fontFamily)
                {
                    return new Font(fontFamily, fontSize, fontStyle, GraphicsUnit.Pixel);
                }
            }
            catch
            {
                using (FontFamily genericFontFamily = FontFamily.GenericSansSerif)
                {
                    return new Font(genericFontFamily, fontSize, fontStyle, GraphicsUnit.Pixel);
                }
            }
        }