...
Description |
---|
Excerpt |
---|
The Font class is used to specify formatting that should be applied to a character run. It also represents the fonts of named styles in the document. |
Signature | ||||
---|---|---|---|---|
| ||||
public sealed class Font
{signature}{signature: |
Signature | ||||||
---|---|---|---|---|---|---|
| }
| |||||
Public NotInheritable Class Font
{signature}
{remarks}There are two ways to obtain an instance of this class. The [Document.CreateFont\(\)|Document.CreateFont()] method creates a new {{Font}} object based on the Normal style. Alternately, using [NamedStyle.Font|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|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.
{remarks}
{example}{code:csharp|title=C#} |
Remarks |
---|
There are two ways to obtain an instance of this class. The Document.CreateFont() method creates a new 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. |
Example | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Properties |
---|
Name | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
| |||||||||
| |||||||||
| |||||||||
| |||||||||
| |||||||||
| |||||||||
| |||||||||
| |||||||||
| |||||||||
| |||||||||
| |||||||||
| |||||||||
| |||||||||
| |||||||||
| |||||||||
| |||||||||
| |||||||||
| |||||||||
| |||||||||
| |||||||||
| |||||||||
| |||||||||
| |||||||||
| |||||||||
| |||||||||
|
Classes |
---|
Name | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
| |||||||||
| |||||||||
|