Class FirstMatchFontSelectorStrategy
java.lang.Object
com.itextpdf.layout.font.selectorstrategy.AbstractFontSelectorStrategy
com.itextpdf.layout.font.selectorstrategy.FirstMatchFontSelectorStrategy
- All Implemented Interfaces:
-
IFontSelectorStrategy
The class implements strategy where the first matched font is used to render as many glyphs as possible.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe factory forFirstMatchFontSelectorStrategy. -
Constructor Summary
ConstructorsConstructorDescriptionFirstMatchFontSelectorStrategy(FontProvider fontProvider, FontSelector fontSelector, FontSet additionalFonts) Creates a new instance ofFirstMatchFontSelectorStrategy. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanIf it is necessary to provide a check that the best font for passed symbol equals to the current font.Methods inherited from class com.itextpdf.layout.font.selectorstrategy.AbstractFontSelectorStrategy
getGlyphLines, matchFont
-
Constructor Details
-
FirstMatchFontSelectorStrategy
public FirstMatchFontSelectorStrategy(FontProvider fontProvider, FontSelector fontSelector, FontSet additionalFonts) Creates a new instance ofFirstMatchFontSelectorStrategy.- Parameters:
-
fontProvider- the font provider -
fontSelector- the font selector -
additionalFonts- the set of fonts to be used additionally to the fonts added to font provider.
-
-
Method Details
-
isCurrentFontCheckRequired
protected boolean isCurrentFontCheckRequired()If it is necessary to provide a check that the best font for passed symbol equals to the current font. Result of checking is used to split text into parts in case if inequality.- Specified by:
-
isCurrentFontCheckRequiredin classAbstractFontSelectorStrategy - Returns:
-
trueif check is needed, otherwisefalse
-