Novacode.Paragraph.Font C# (CSharp) Method

Font() public method

For use with Append() and AppendLine()
public Font ( Font fontFamily ) : Paragraph
fontFamily System.Drawing.Font The font to use for the appended text.
return Paragraph
        public Paragraph Font(Font fontFamily)
        {
            ApplyTextFormattingProperty
            (
                XName.Get("rFonts", DocX.w.NamespaceName),
                string.Empty,
                new[]
                {
                    new XAttribute(XName.Get("ascii", DocX.w.NamespaceName), fontFamily.Name),
                    new XAttribute(XName.Get("hAnsi", DocX.w.NamespaceName), fontFamily.Name), // Added by Maurits Elbers to support non-standard characters. See http://docx.codeplex.com/Thread/View.aspx?ThreadId=70097&ANCHOR#Post453865
                    new XAttribute(XName.Get("cs", DocX.w.NamespaceName), fontFamily.Name),    // Added by Maurits Elbers to support non-standard characters. See http://docx.codeplex.com/Thread/View.aspx?ThreadId=70097&ANCHOR#Post453865
                    new XAttribute(XName.Get("eastAsia", DocX.w.NamespaceName), fontFamily.Name) // DOCX in china #57
                }
            );

            return this;
        }

Same methods

Paragraph::Font ( string fontName ) : Paragraph