//public string GetName(int language); /// <summary> /// Indicates whether the specified FontStyle enumeration is available. /// </summary> public bool IsStyleAvailable(XFontStyle style) { XGdiFontStyle xStyle = ((XGdiFontStyle)style) & XGdiFontStyle.BoldItalic; #if CORE throw new InvalidOperationException("In CORE build it is the responsibility of the developer to provide all required font faces."); #endif #if GDI && !WPF if (GdiFamily != null) { return(GdiFamily.IsStyleAvailable((GdiFontStyle)xStyle)); } return(false); #endif #if WPF && !GDI if (WpfFamily != null) { return(FontHelper.IsStyleAvailable(this, xStyle)); } return(false); #endif #if WPF && GDI #if DEBUG //bool gdiResult = _gdiFamily.IsStyle Available((FontStyle)style); //bool wpfResult = FontHelper.IsStyle Available(this, style); //// TODOWPF: check when fails //Debug.Assert(gdiResult == wpfResult, "GDI+ and WPF provide different values."); #endif return(FontHelper.IsStyleAvailable(this, xStyle)); #endif #if NETFX_CORE || UWP || DNC10 throw new InvalidOperationException("In NETFX_CORE build it is the responsibility of the developer to provide all required font faces."); #endif }
//public string GetName(int language); /// <summary> /// Indicates whether the specified FontStyle enumeration is available. /// </summary> public bool IsStyleAvailable(XFontStyle style) { XGdiFontStyle xStyle = ((XGdiFontStyle)style) & XGdiFontStyle.BoldItalic; #if CORE throw new InvalidOperationException("In CORE build it is the responsibility of the developer to provide all required font faces."); #endif #if GDI && !WPF if (GdiFamily != null) { return(GdiFamily.IsStyleAvailable((GdiFontStyle)xStyle)); } return(false); #endif }