iText 8.0.5 API
|
Main entry point of font selector logic. More...
Public Member Functions |
|
FontProvider (FontSet fontSet) | |
Creates a new instance of FontProvider. More... |
|
FontProvider () | |
Creates a new instance of FontProvider. More... |
|
FontProvider (String defaultFontFamily) | |
Creates a new instance of FontProvider. More... |
|
FontProvider (FontSet fontSet, String defaultFontFamily) | |
Creates a new instance of FontProvider. More... |
|
virtual bool | AddFont (FontProgram fontProgram, String encoding, Range unicodeRange) |
Add font to FontSet cache. More... |
|
virtual bool | AddFont (FontProgram fontProgram, String encoding) |
Add font to FontSet cache. More... |
|
virtual bool | AddFont (FontProgram fontProgram) |
Add font to FontSet cache. More... |
|
virtual bool | AddFont (String fontPath, String encoding, Range unicodeRange) |
Add font to FontSet cache. More... |
|
virtual bool | AddFont (String fontPath, String encoding) |
Add font to FontSet cache. More... |
|
virtual bool | AddFont (String fontPath) |
Add font to FontSet cache. More... |
|
virtual bool | AddFont (byte[] fontData, String encoding, Range unicodeRange) |
Add font to FontSet cache. More... |
|
virtual bool | AddFont (byte[] fontData, String encoding) |
Add font to FontSet cache. More... |
|
virtual bool | AddFont (byte[] fontData) |
Add font to FontSet cache. More... |
|
virtual int | AddDirectory (String dir) |
Add all the fonts from a directory. More... |
|
virtual int | AddSystemFonts () |
Add all fonts from system directories to FontSet cache. More... |
|
virtual int | AddStandardPdfFonts () |
Add standard fonts to FontSet cache. More... |
|
virtual FontSet | GetFontSet () |
Gets FontSet. More... |
|
virtual String | GetDefaultFontFamily () |
Gets the default font-family. More... |
|
virtual String | GetDefaultEncoding (FontProgram fontProgram) |
Gets the default encoding for specific font. More... |
|
virtual bool | GetDefaultCacheFlag () |
The method is used to determine whether the font should be cached or not by default. More... |
|
virtual bool | GetDefaultEmbeddingFlag () |
The method is used to determine whether the font should be embedded or not by default. More... |
|
virtual FontSelectorStrategy | GetStrategy (String text, IList< String > fontFamilies, FontCharacteristics fc, FontSet additionalFonts) |
Gets the FontSelectorStrategy to split specified text into sequences of glyphs, already tied to the fonts which contain them. More... |
|
virtual FontSelectorStrategy | GetStrategy (String text, IList< String > fontFamilies, FontCharacteristics fc) |
Gets the FontSelectorStrategy to split specified text into sequences of glyphs, already tied to the fonts which contain them. More... |
|
virtual FontSelectorStrategy | GetStrategy (String text, IList< String > fontFamilies) |
Gets the FontSelectorStrategy to split specified text into sequences of glyphs, already tied to the fonts which contain them. More... |
|
virtual void | SetFontSelectorStrategyFactory (IFontSelectorStrategyFactory factory) |
Sets factory which will be used in |
|
virtual IFontSelectorStrategy | CreateFontSelectorStrategy (IList< String > fontFamilies, FontCharacteristics fc, FontSet additionalFonts) |
Creates the iText.Layout.Font.Selectorstrategy.IFontSelectorStrategy to split text into sequences of glyphs, already tied to the fonts which contain them. More... |
|
FontSelector | GetFontSelector (IList< String > fontFamilies, FontCharacteristics fc) |
Create FontSelector or get from cache. More... |
|
FontSelector | GetFontSelector (IList< String > fontFamilies, FontCharacteristics fc, FontSet additionalFonts) |
Create FontSelector or get from cache. More... |
|
virtual PdfFont | GetPdfFont (FontInfo fontInfo) |
Get from cache or create a new instance of iText.Kernel.Font.PdfFont. More... |
|
virtual PdfFont | GetPdfFont (FontInfo fontInfo, FontSet additionalFonts) |
Get from cache or create a new instance of iText.Kernel.Font.PdfFont. More... |
|
virtual void | Reset () |
Resets PdfFont cache. More... |
|
Package Functions |
|
virtual FontSelector | CreateFontSelector (ICollection< FontInfo > fonts, IList< String > fontFamilies, FontCharacteristics fc) |
Create a new instance of FontSelector. More... |
|
Package Attributes |
|
readonly String | defaultFontFamily |
The default font-family is used by FontSelector if it's impossible to select a font for all other set font-families More... |
|
readonly IDictionary< FontInfo, PdfFont > | pdfFonts |
Main entry point of font selector logic.
Main entry point of font selector logic. Contains reusable FontSet and collection of iText.Kernel.Font.PdfFont s. FontProvider depends on iText.Kernel.Pdf.PdfDocument due to iText.Kernel.Font.PdfFont , so it cannot be reused for different documents unless reset with Reset() or recreated with GetFontSet(). In the former case the FontSelectorCache is reused and in the latter it's reinitialised. FontProvider the only end point for creating iText.Kernel.Font.PdfFont.
It is allowed to use only one FontProvider per document. If additional fonts per element needed, another instance of FontSet can be used. For more details see iText.Layout.Properties.Property.FONT_SET , GetPdfFont(FontInfo, FontSet) ,
Note, FontProvider does not close created iText.IO.Font.FontProgram s, because of possible conflicts with iText.IO.Font.FontCache.
|
inline |
Creates a new instance of FontProvider.
fontSet | predefined set of fonts, could be null. |
|
inline |
Creates a new instance of FontProvider.
|
inline |
Creates a new instance of FontProvider.
defaultFontFamily | default font family. |
|
inline |
Creates a new instance of FontProvider.
fontSet | predefined set of fonts, could be null. |
defaultFontFamily | default font family. |
|
inlinevirtual |
Add all the fonts from a directory.
dir | path to directory. |
|
inlinevirtual |
Add font to FontSet cache.
fontData | byte content of the font program file. |
|
inlinevirtual |
Add font to FontSet cache.
fontData | byte content of the font program file. |
encoding | font encoding to create iText.Kernel.Font.PdfFont . Possible values for this argument are the same as for iText.Kernel.Font.PdfFontFactory.CreateFont() family of methods. |
|
inlinevirtual |
Add font to FontSet cache.
fontData | byte content of the font program file. |
encoding | font encoding to create iText.Kernel.Font.PdfFont . Possible values for this argument are the same as for iText.Kernel.Font.PdfFontFactory.CreateFont() family of methods. |
unicodeRange | sets the specific range of characters to be used from the font. |
|
inlinevirtual |
Add font to FontSet cache.
fontProgram | the font file which will be added to font cache. The iText.IO.Font.FontProgram instances are normally created via iText.IO.Font.FontProgramFactory. |
|
inlinevirtual |
Add font to FontSet cache.
fontProgram | the font file which will be added to font cache. The iText.IO.Font.FontProgram instances are normally created via iText.IO.Font.FontProgramFactory. |
encoding | font encoding to create iText.Kernel.Font.PdfFont . Possible values for this argument are the same as for iText.Kernel.Font.PdfFontFactory.CreateFont() family of methods. |
|
inlinevirtual |
Add font to FontSet cache.
fontProgram | the font file which will be added to font cache. The iText.IO.Font.FontProgram instances are normally created via iText.IO.Font.FontProgramFactory. |
encoding | font encoding to create iText.Kernel.Font.PdfFont . Possible values for this argument are the same as for iText.Kernel.Font.PdfFontFactory.CreateFont() family of methods. |
unicodeRange | sets the specific range of characters to be used from the font. |
|
inlinevirtual |
Add font to FontSet cache.
fontPath | path to the font file to add. Can be a path to file or font name, see iText.IO.Font.FontProgramFactory.CreateFont(System.String). |
|
inlinevirtual |
Add font to FontSet cache.
fontPath | path to the font file to add. Can be a path to file or font name, see iText.IO.Font.FontProgramFactory.CreateFont(System.String). |
encoding | font encoding to create iText.Kernel.Font.PdfFont . Possible values for this argument are the same as for iText.Kernel.Font.PdfFontFactory.CreateFont() family of methods. |
|
inlinevirtual |
Add font to FontSet cache.
fontPath | path to the font file to add. Can be a path to file or font name, see iText.IO.Font.FontProgramFactory.CreateFont(System.String). |
encoding | font encoding to create iText.Kernel.Font.PdfFont . Possible values for this argument are the same as for iText.Kernel.Font.PdfFontFactory.CreateFont() family of methods. |
unicodeRange | sets the specific range of characters to be used from the font. |
|
inlinevirtual |
Add standard fonts to FontSet cache.
|
inlinevirtual |
Add all fonts from system directories to FontSet cache.
|
inlinepackagevirtual |
Create a new instance of FontSelector.
Create a new instance of FontSelector . While caching is main responsibility of GetFontSelector(System.Collections.Generic.IList
fonts | Set of all available fonts in current context. |
fontFamilies | target font families. |
fc | instance of FontCharacteristics. |
|
inlinevirtual |
Creates the iText.Layout.Font.Selectorstrategy.IFontSelectorStrategy to split text into sequences of glyphs, already tied to the fonts which contain them.
Creates the iText.Layout.Font.Selectorstrategy.IFontSelectorStrategy to split text into sequences of glyphs, already tied to the fonts which contain them. The fonts can be taken from the added fonts to the font provider and are chosen based on font-families list and desired font characteristics.
fontFamilies | target font families to create FontSelector for sequences of glyphs. |
fc | instance of FontCharacteristics to create FontSelector for sequences of glyphs. |
additionalFonts | set which provides fonts additionally to the fonts added to font provider. Combined set of font provider fonts and additional fonts is used when choosing a single font for a sequence of glyphs. Additional fonts will only be used for the given font selector strategy instance and will not be otherwise preserved in font provider. |
iText.Layout.Font.Selectorstrategy.IFontSelectorStrategy instance
|
inlinevirtual |
The method is used to determine whether the font should be cached or not by default.
The method is used to determine whether the font should be cached or not by default.
NOTE: This method can be overridden to customize behaviour.
|
inlinevirtual |
The method is used to determine whether the font should be embedded or not by default.
The method is used to determine whether the font should be embedded or not by default.
NOTE: This method can be overridden to customize behaviour.
|
inlinevirtual |
Gets the default encoding for specific font.
fontProgram | to get default encoding |
|
inlinevirtual |
Gets the default font-family.
|
inline |
Create FontSelector or get from cache.
fontFamilies | target font families. |
fc | instance of FontCharacteristics. |
|
inline |
Create FontSelector or get from cache.
fontFamilies | target font families. |
fc | instance of FontCharacteristics. |
additionalFonts | set which provides fonts additionally to the fonts added to font provider. Combined set of font provider fonts and additional fonts is used when choosing a single font for FontSelector . Additional fonts will only be used for the given font selector strategy instance and will not be otherwise preserved in font provider. |
}
|
inlinevirtual |
Gets FontSet.
Get from cache or create a new instance of iText.Kernel.Font.PdfFont.
fontInfo | font info, to create iText.IO.Font.FontProgram and iText.Kernel.Font.PdfFont. |
|
inlinevirtual |
Get from cache or create a new instance of iText.Kernel.Font.PdfFont.
fontInfo | font info, to create iText.IO.Font.FontProgram and iText.Kernel.Font.PdfFont. |
additionalFonts | set of additional fonts to consider. |
|
inlinevirtual |
Gets the FontSelectorStrategy to split specified text into sequences of glyphs, already tied to the fonts which contain them.
Gets the FontSelectorStrategy to split specified text into sequences of glyphs, already tied to the fonts which contain them. The fonts can be taken from the added fonts to the font provider and are chosen based on font-families list and desired font characteristics.
text | for splitting into sequences of glyphs. |
fontFamilies | target font families to create FontSelector for sequences of glyphs. |
FontSelectorStrategy instance.
|
inlinevirtual |
Gets the FontSelectorStrategy to split specified text into sequences of glyphs, already tied to the fonts which contain them.
Gets the FontSelectorStrategy to split specified text into sequences of glyphs, already tied to the fonts which contain them. The fonts can be taken from the added fonts to the font provider and are chosen based on font-families list and desired font characteristics.
text | for splitting into sequences of glyphs. |
fontFamilies | target font families to create FontSelector for sequences of glyphs. |
fc | instance of FontCharacteristics to create FontSelector for sequences of glyphs. |
FontSelectorStrategy instance.
|
inlinevirtual |
Gets the FontSelectorStrategy to split specified text into sequences of glyphs, already tied to the fonts which contain them.
Gets the FontSelectorStrategy to split specified text into sequences of glyphs, already tied to the fonts which contain them. The fonts can be taken from the added fonts to the font provider and are chosen based on font-families list and desired font characteristics.
text | for splitting into sequences of glyphs. |
fontFamilies | target font families to create FontSelector for sequences of glyphs. |
fc | instance of FontCharacteristics to create FontSelector for sequences of glyphs. |
additionalFonts | set which provides fonts additionally to the fonts added to font provider. Combined set of font provider fonts and additional fonts is used when choosing a single font for a sequence of glyphs. Additional fonts will only be used for the given font selector strategy instance and will not be otherwise preserved in font provider. |
FontSelectorStrategy instance.
|
inlinevirtual |
Resets PdfFont cache.
Resets PdfFont cache. After calling that method FontProvider can be reused with another iText.Kernel.Pdf.PdfDocument
|
inlinevirtual |
Sets factory which will be used in
factory | the factory which will be used to create font selector strategies |
|
package |
The default font-family is used by FontSelector if it's impossible to select a font for all other set font-families