Aspose::Pdf::Text::CustomFontSubstitutionBase::TrySubstitute method

CustomFontSubstitutionBase::TrySubstitute method

Substitutes original font with another font.

virtual bool Aspose::Pdf::Text::CustomFontSubstitutionBase::TrySubstitute(System::SharedPtr<CustomFontSubstitutionBase::OriginalFontSpecification> originalFontSpecification, System::SharedPtr<Font> &substitutionFont)
ParameterTypeDescription
originalFontSpecificationSystem::SharedPtr<CustomFontSubstitutionBase::OriginalFontSpecification>Original font specification.
substitutionFontSystem::SharedPtr<Font>&Substitution font.

ReturnValue

True in case substitution was successfull.

Remarks

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.

See Also