Package com.itextpdf.tool.xml
Class XMLWorkerFontProvider
- java.lang.Object
-
- com.itextpdf.text.FontFactoryImp
-
- com.itextpdf.tool.xml.XMLWorkerFontProvider
-
- All Implemented Interfaces:
FontProvider
public class XMLWorkerFontProvider extends FontFactoryImp
-
-
Field Summary
Fields Modifier and Type Field Description static StringDONTLOOKFORFONTSprotected HashMap<String,String>fontSubstitutionMapprotected booleanuseUnicode-
Fields inherited from class com.itextpdf.text.FontFactoryImp
defaultEmbedding, defaultEncoding
-
-
Constructor Summary
Constructors Constructor Description XMLWorkerFontProvider()XMLWorkerFontProvider(String fontsPath)XMLWorkerFontProvider(String fontsPath, HashMap<String,String> fontSubstitutionMap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFontSubstitute(String font, String substitute)FontgetFont(String fontname, String encoding, boolean embedded, float size, int style, BaseColor color)Constructs aFont-object.FontgetFont(String fontname, String encoding, float size, int style)Constructs aFont-object.voidsetUseUnicode(boolean useUnicode)-
Methods inherited from class com.itextpdf.text.FontFactoryImp
getBaseFont, getFont, getFont, getFont, getFont, getFont, getFont, getFont, getFont, getFont, getFont, getFont, getFont, getRegisteredFamilies, getRegisteredFonts, isRegistered, register, register, registerDirectories, registerDirectory, registerDirectory, registerFamily, saveCopyOfRegularFont
-
-
-
-
Field Detail
-
DONTLOOKFORFONTS
public static final String DONTLOOKFORFONTS
- See Also:
- Constant Field Values
-
useUnicode
protected boolean useUnicode
-
-
Method Detail
-
setUseUnicode
public void setUseUnicode(boolean useUnicode)
-
getFont
public Font getFont(String fontname, String encoding, boolean embedded, float size, int style, BaseColor color)
Description copied from class:FontFactoryImpConstructs aFont-object.- Specified by:
getFontin interfaceFontProvider- Overrides:
getFontin classFontFactoryImp- Parameters:
fontname- the name of the fontencoding- the encoding of the fontembedded- true if the font is to be embedded in the PDFsize- the size of this fontstyle- the style of this fontcolor- theBaseColorof this font.- Returns:
- the Font constructed based on the parameters
-
getFont
public Font getFont(String fontname, String encoding, float size, int style)
Description copied from class:FontFactoryImpConstructs aFont-object.- Overrides:
getFontin classFontFactoryImp- Parameters:
fontname- the name of the fontencoding- the encoding of the fontsize- the size of this fontstyle- the style of this font- Returns:
- the Font constructed based on the parameters
-
-