FontSettings Class
FontSettings class
Specifies font settings for a document.
public class FontSettings
Constructors
Name | Description |
---|---|
FontSettings() | The default constructor. |
Properties
Name | Description |
---|---|
FallbackSettings { get; } | Settings related to font fallback mechanism. |
SubstitutionSettings { get; } | Settings related to font substitution mechanism. |
Methods
Name | Description |
---|---|
GetFontsSources() | Gets a copy of the array that contains the list of sources where Wordize looks for TrueType fonts. |
ResetFontSources() | Resets the fonts sources to the system default. |
SaveSearchCache(Stream) | Saves the font search cache to the stream. |
SetFontsFolder(string, bool) | Sets the folder where Wordize looks for TrueType fonts when rendering documents or embedding fonts. This is a shortcut to SetFontsFolders for setting only one font directory. |
SetFontsFolders(string[], bool) | Sets the folders where Wordize looks for TrueType fonts when rendering documents or embedding fonts. |
SetFontsSources(FontSourceBase[]) | Sets the sources where Wordize looks for TrueType fonts when rendering documents or embedding fonts. |
SetFontsSources(FontSourceBase[], Stream) | Sets the sources where Wordize looks for TrueType fonts and additionally loads previously saved font search cache. |
Remarks
Wordize uses font settings to resolve the fonts in the document. Fonts are resolved mostly when building document layout or rendering to fixed page formats. But when loading some formats, Wordize also may require to resolve the fonts. For example, when loading HTML documents Wordize may resolve the fonts to perform font fallback. So it is recommended that you set the font settings in LoadOptions
when loading the document. Or at least before building the layout or rendering the document to the fixed-page format.
By default all documents uses single static font settings instance. It could be accessed by DefaultFontSettings
property.
Changing font settings is safe at any time from any thread. But it is recommended that you do not change the font settings while processing some documents which uses this settings. This can lead to the fact that the same font will be resolved differently in different parts of the document.
See Also
- namespace Wordize.Fonts
- assembly Wordize