private static Font GetFontFromData(SafeNativeMethods.LOGFONT logFont) { if (logFont == null) { return(null); } Font font = null; try { font = Font.FromLogFont(logFont); } catch (Exception ex) when(!IsCriticalFontException(ex)) { } return (font == null ? DefaultFont : font.Unit != GraphicsUnit.Point ? FontInPoints(font) : font); }