/// <summary> /// /// </summary> /// <param name="name"></param> /// <param name="fontName"></param> /// <param name="fontFile"></param> /// <param name="fontSize"></param> /// <param name="fontStyle"></param> /// <param name="textHAlignment"></param> /// <param name="textVAlignment"></param> /// <returns></returns> public static TextStyle Create( string name = "", string fontName = "Calibri", string fontFile = "calibri.ttf", double fontSize = 12.0, FontStyle fontStyle = null, TextHAlignment textHAlignment = TextHAlignment.Center, TextVAlignment textVAlignment = TextVAlignment.Center) { return(new TextStyle() { Name = name, FontName = fontName, FontFile = fontFile, FontSize = fontSize, FontStyle = fontStyle ?? FontStyle.Create(FontStyleFlags.Regular), TextHAlignment = textHAlignment, TextVAlignment = textVAlignment }); }
/// <summary> /// Creates a new <see cref="TextStyle"/> instance. /// </summary> /// <param name="name"></param> /// <param name="fontName"></param> /// <param name="fontFile"></param> /// <param name="fontSize"></param> /// <param name="fontStyle"></param> /// <param name="textHAlignment"></param> /// <param name="textVAlignment"></param> /// <returns></returns> public static TextStyle Create( string name = "", string fontName = "Calibri", string fontFile = "calibri.ttf", double fontSize = 12.0, FontStyle fontStyle = null, TextHAlignment textHAlignment = TextHAlignment.Center, TextVAlignment textVAlignment = TextVAlignment.Center) { return new TextStyle() { Name = name, FontName = fontName, FontFile = fontFile, FontSize = fontSize, FontStyle = fontStyle ?? FontStyle.Create(FontStyleFlags.Regular), TextHAlignment = textHAlignment, TextVAlignment = textVAlignment }; }