CustomFontSubstitutionBase
Contents
[
Hide
]Inheritance: java.lang.Object, com.aspose.pdf.text.FontSubstitution
public class CustomFontSubstitutionBase extends FontSubstitution
Represents a base class for custom font substitution strategy.
Constructors
Constructor | Description |
---|---|
CustomFontSubstitutionBase() |
Methods
Method | Description |
---|---|
trySubstitute(CustomFontSubstitutionBase.OriginalFontSpecification originalFontSpecification, Font[] substitutionFont) | Substitutes original font with another font. |
CustomFontSubstitutionBase()
public CustomFontSubstitutionBase()
trySubstitute(CustomFontSubstitutionBase.OriginalFontSpecification originalFontSpecification, Font[] substitutionFont)
public boolean trySubstitute(CustomFontSubstitutionBase.OriginalFontSpecification originalFontSpecification, Font[] substitutionFont)
Substitutes original font with another font.
Parameters:
Parameter | Type | Description |
---|---|---|
originalFontSpecification | OriginalFontSpecification | Original font specification. |
substitutionFont | Font[] | Substitution font. |
The class CustomFontSubstitutionBase should be inherited to implement custom font substitution logic. TrySubstitute method should be overridden properly: Must return true in case substitution is required. substitutionFont must be set to valid Font object. Must return false in case no substitution is required. substitutionFont may be set to null. |
Returns: boolean - True in case substitution was successful.