SimpleFontSubstitution
Overview
SimpleFontSubstitution is a class in Aspose.PDF FOSS for .NET.
Inherits from: CustomFontSubstitutionBase.
A font substitution that replaces one font name with another: when the original name matches exactly (case-sensitive), the substitute font is looked up in FontRepository.
This class declares 5 methods for SimpleFontSubstitution objects in .NET programs.
Available methods include: CustomFontSubstitutionBase, FontSubstitution, SimpleFontSubstitution, TrySubstitute.
Public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.
Properties: IsForcedBySaveOption, OriginalFontName, SubstitutionFontName.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
OriginalFontName | string | Read | Gets the name of the font to be replaced. |
SubstitutionFontName | string | Read | Gets the substitution font name. |
IsForcedBySaveOption | bool | Read | Whether the substitution is forced by save-option configuration. |
Methods
| Signature | Description |
|---|---|
SimpleFontSubstitution(originalFontName: string, substitutionFontName: string) | Creates a substitution that replaces originalFontName with substitutionFontName; throws when either name is null. |
SimpleFontSubstitution(originalFontName: string, substitutionFontName: string, isForcedBySaveOption: bool) | Creates a substitution that replaces originalFontName with substitutionFontName and records whether it is forced by save options (stored only). |
TrySubstitute(originalFontSpecification: OriginalFontSpecification, substitutionFont: Font?) | Calls TrySubstitute(originalFontSpecification, substitutionFont) on this SimpleFontSubstitution instance. |
CustomFontSubstitutionBase() | Creates a substitution whose default TrySubstitute never substitutes. |
FontSubstitution() | Creates an empty font substitution. |