Class BestMatchFontSelectorStrategy
- java.lang.Object
-
- com.itextpdf.layout.font.selectorstrategy.AbstractFontSelectorStrategy
-
- com.itextpdf.layout.font.selectorstrategy.BestMatchFontSelectorStrategy
-
- All Implemented Interfaces:
IFontSelectorStrategy
public class BestMatchFontSelectorStrategy extends AbstractFontSelectorStrategy
The class implements strategy where the best font for each symbol is used if possible.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BestMatchFontSelectorStrategy.BestMatchFontSelectorStrategyFactory
The factory forBestMatchFontSelectorStrategy
.
-
Constructor Summary
Constructors Constructor Description BestMatchFontSelectorStrategy(FontProvider fontProvider, FontSelector fontSelector, FontSet additionalFonts)
Creates a new instance ofBestMatchFontSelectorStrategy
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
isCurrentFontCheckRequired()
If 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 Detail
-
BestMatchFontSelectorStrategy
public BestMatchFontSelectorStrategy(FontProvider fontProvider, FontSelector fontSelector, FontSet additionalFonts)
Creates a new instance ofBestMatchFontSelectorStrategy
.- Parameters:
fontProvider
- the font providerfontSelector
- the font selectoradditionalFonts
- the set of fonts to be used additionally to the fonts added to font provider.
-
-
Method Detail
-
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:
isCurrentFontCheckRequired
in classAbstractFontSelectorStrategy
- Returns:
true
if check is needed, otherwisefalse
-
-