private Drawing.FontFamily TransformFontFamily(Styles.FontFamily fontFamily) { if (fontFamily == Styles.FontFamily.GenericMonospace) { return(Drawing.FontFamily.GenericMonospace); } else if (fontFamily == Styles.FontFamily.GenericSansSerif) { return(Drawing.FontFamily.GenericSansSerif); } else if (fontFamily == Styles.FontFamily.GenericSerif) { return(Drawing.FontFamily.GenericSerif); } else { return(new Drawing.FontFamily(fontFamily.Name)); } }
private Media.FontFamily TransformFontFamily(Styles.FontFamily fontFamily) { if (fontFamily == Styles.FontFamily.GenericMonospace) { return(new Media.FontFamily("Courier New")); } else if (fontFamily == Styles.FontFamily.GenericSansSerif) { return(new Media.FontFamily("Arial")); } else if (fontFamily == Styles.FontFamily.GenericSerif) { return(new Media.FontFamily("Times New Roman")); } else { return(new Media.FontFamily(fontFamily.Name)); } }
private Graphics.Typeface TransformFontFamilyToTypefaceFamily(Styles.FontFamily fontFamily) { if (fontFamily == Styles.FontFamily.GenericMonospace) { return(Graphics.Typeface.Monospace); } else if (fontFamily == Styles.FontFamily.GenericSansSerif) { return(Graphics.Typeface.SansSerif); } else if (fontFamily == Styles.FontFamily.GenericSerif) { return(Graphics.Typeface.Serif); } else { return(Graphics.Typeface.Create(fontFamily.Name, Graphics.TypefaceStyle.Normal)); } }
static FontFamily() { GenericMonospace = new FontFamily("GenericMonospace"); GenericSansSerif = new FontFamily("GenericSansSerif"); GenericSerif = new FontFamily("GenericSerif"); }