There are two ways to obtain an instance of this class. The Document.CreateFont() method creates a new Font object based on the Normal style. Alternately, using NamedStyle.Font, you can create a Font object that is a copy of a particular style's font. The Font object that is returned can then be used in conjunction with methods in the Element class to create character runs, paragraphs, etc, with specific fonts. The following example demonstrates both ways of getting a font, first by retrieving the Normal style's font from the document, second by retrieving a copy of the Heading1 style's font. |