public class CustomFontSubstitutionBase extends FontSubstitution
Represents a base class for custom font substitution strategy.
Modifier and Type | Class and Description |
---|---|
static class |
CustomFontSubstitutionBase.OriginalFontSpecification
Represents original font specification.
|
Constructor and Description |
---|
CustomFontSubstitutionBase() |
Modifier and Type | Method and Description |
---|---|
boolean |
trySubstitute(CustomFontSubstitutionBase.OriginalFontSpecification originalFontSpecification,
Font[] substitutionFont)
Substitutes original font with another font.
|
getSubstitutedUnicode, getSubstitutionFontDefinition, setSubstitutionFontDefinition
public boolean trySubstitute(CustomFontSubstitutionBase.OriginalFontSpecification originalFontSpecification, Font[] substitutionFont)
Substitutes original font with another font.
originalFontSpecification
- Original font specification.substitutionFont
- 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.