iText 8.0.2 API
|
Provides methods for creating various types of fonts. More...
Static Public Member Functions |
|
static FontProgram | CreateFont () |
Creates a new standard Helvetica font program file. More... |
|
static FontProgram | CreateFont (String fontProgram) |
Creates a new font program. More... |
|
static FontProgram | CreateFont (String fontProgram, bool cached) |
Creates a new font program. More... |
|
static FontProgram | CreateFont (String fontProgram, String cmap, bool cached) |
Creates a new font program. More... |
|
static FontProgram | CreateFont (byte[] fontProgram) |
Creates a new font program. More... |
|
static FontProgram | CreateFont (byte[] fontProgram, bool cached) |
Creates a new font program. More... |
|
static FontProgram | CreateType1Font (byte[] afm, byte[] pfb) |
Creates a new Type 1 font by the byte contents of the corresponding AFM/PFM and PFB files More... |
|
static FontProgram | CreateType1Font (byte[] afm, byte[] pfb, bool cached) |
Creates a new Type 1 font by the byte contents of the corresponding AFM/PFM and PFB files More... |
|
static FontProgram | CreateType1Font (String metricsPath, String binaryPath) |
Creates a new Type 1 font by the corresponding AFM/PFM and PFB files More... |
|
static FontProgram | CreateType1Font (String metricsPath, String binaryPath, bool cached) |
Creates a new Type 1 font by the corresponding AFM/PFM and PFB files More... |
|
static FontProgram | CreateFont (String ttc, int ttcIndex, bool cached) |
Creates a new TrueType font program from ttc (TrueType Collection) file. More... |
|
static FontProgram | CreateFont (byte[] ttc, int ttcIndex, bool cached) |
Creates a new TrueType font program from ttc (TrueType Collection) file bytes. More... |
|
static FontProgram | CreateRegisteredFont (String fontName, int style, bool cached) |
Creates a FontProgram from the font file that has been previously registered. More... |
|
static FontProgram | CreateRegisteredFont (String fontName, int style) |
Creates a FontProgram from the font file that has been previously registered. More... |
|
static FontProgram | CreateRegisteredFont (String fontName) |
Creates a FontProgram from the font file that has been previously registered. More... |
|
static void | RegisterFontFamily (String familyName, String fullName, String path) |
Register a font by giving explicitly the font family and name. More... |
|
static void | RegisterFont (String path) |
Registers a .ttf, .otf, .afm, .pfm, or a .ttc font file. More... |
|
static void | RegisterFont (String path, String alias) |
Register a font file and use an alias for the font contained in it. More... |
|
static int | RegisterFontDirectory (String dir) |
Register all the fonts in a directory. More... |
|
static int | RegisterSystemFontDirectories () |
Register fonts in some probable directories. More... |
|
static ICollection< String > | GetRegisteredFonts () |
Gets a set of registered font names. More... |
|
static ICollection< String > | GetRegisteredFontFamilies () |
Gets a set of registered font names. More... |
|
static bool | IsRegisteredFont (String fontName) |
Checks if a certain font is registered. More... |
|
static void | ClearRegisteredFonts () |
static void | ClearRegisteredFontFamilies () |
Clears registered font cache More... |
|
Provides methods for creating various types of fonts.
|
inlinestatic |
Clears registered font cache
|
inlinestatic |
Creates a new standard Helvetica font program file.
|
inlinestatic |
Creates a new font program.
Creates a new font program. This font program can be one of the 14 built in fonts, a Type1 font referred to by an AFM or PFM file, a TrueType font or a CJK font from the Adobe Asian Font Pack. Fonts in TrueType Collections are addressed by index such as "msgothic.ttc,1". This would get the second font (indexes start at 0), in this case "MS PGothic".
The fonts are cached and if they already exist they are extracted from the cache, not parsed again.
fontProgram | the byte contents of the font program |
|
inlinestatic |
Creates a new font program.
Creates a new font program. This font program can be one of the 14 built in fonts, a Type 1 font referred to by an AFM or PFM file, a TrueType font or a CJK font from the Adobe Asian Font Pack. Fonts in TrueType Collections are addressed by index such as "msgothic.ttc,1". This would get the second font (indexes start at 0), in this case "MS PGothic".
The fonts are cached and if they already exist they are extracted from the cache, not parsed again.
fontProgram | the byte contents of the font program |
cached | whether to to cache this font program |
|
inlinestatic |
Creates a new TrueType font program from ttc (TrueType Collection) file bytes.
ttc | the content of a TrueType Collection file (*.ttc) |
ttcIndex | the index of the font file from the collection to be read |
cached | true if the font comes from the cache or is added to the cache if new, false if the font is always created new |
|
inlinestatic |
Creates a new font program.
Creates a new font program. This font program can be one of the 14 built in fonts, a Type1 font referred to by an AFM or PFM file, a TrueType font or a CJK font from the Adobe Asian Font Pack. Fonts in TrueType Collections are addressed by index such as "msgothic.ttc,1". This would get the second font (indexes start at 0), in this case "MS PGothic".
The fonts are cached and if they already exist they are extracted from the cache, not parsed again.
fontProgram | the name of the font or its location on file |
|
inlinestatic |
Creates a new font program.
Creates a new font program. This font program can be one of the 14 built in fonts, a Type1 font referred to by an AFM or PFM file, a TrueType font or a CJK font from the Adobe Asian Font Pack. Fonts in TrueType Collections are addressed by index such as "msgothic.ttc,1". This would get the second font (indexes start at 0), in this case "MS PGothic".
The fonts are cached and if they already exist they are extracted from the cache, not parsed again.
fontProgram | the name of the font or its location on file |
cached | whether to to cache this font program after it has been loaded |
|
inlinestatic |
Creates a new font program.
Creates a new font program. This font program can be one of the 14 built in fonts, a Type1 font referred to by an AFM or PFM file, a TrueType font or a CJK font from the Adobe Asian Font Pack. Fonts in TrueType Collections are addressed by index such as "msgothic.ttc,1". This would get the second font (indexes start at 0), in this case "MS PGothic".
The fonts are cached and if they already exist they are extracted from the cache, not parsed again.
fontProgram | the name of the font or its location on file |
cmap | CMap to convert Unicode value to CID if CJK font is used |
cached | whether to cache this font program after it has been loaded |
|
inlinestatic |
Creates a new TrueType font program from ttc (TrueType Collection) file.
ttc | location of TrueType Collection file (*.ttc) |
ttcIndex | the index of the font file from the collection to be read |
cached | true if the font comes from the cache or is added to the cache if new, false if the font is always created new |
|
inlinestatic |
Creates a FontProgram from the font file that has been previously registered.
fontName | either a font alias, if the font file has been registered with an alias, or just a font name otherwise |
|
inlinestatic |
Creates a FontProgram from the font file that has been previously registered.
fontName | either a font alias, if the font file has been registered with an alias, or just a font name otherwise |
style | the style of the font to look for. Possible values are listed in iText.IO.Font.Constants.FontStyles. See iText.IO.Font.Constants.FontStyles.BOLD , iText.IO.Font.Constants.FontStyles.ITALIC , iText.IO.Font.Constants.FontStyles.NORMAL , iText.IO.Font.Constants.FontStyles.BOLDITALIC , iText.IO.Font.Constants.FontStyles.UNDEFINED |
|
inlinestatic |
Creates a FontProgram from the font file that has been previously registered.
fontName | either a font alias, if the font file has been registered with an alias, or just a font name otherwise |
style | the style of the font to look for. Possible values are listed in iText.IO.Font.Constants.FontStyles. See iText.IO.Font.Constants.FontStyles.BOLD , iText.IO.Font.Constants.FontStyles.ITALIC , iText.IO.Font.Constants.FontStyles.NORMAL , iText.IO.Font.Constants.FontStyles.BOLDITALIC , iText.IO.Font.Constants.FontStyles.UNDEFINED |
cached | whether to try to get the font program from cache |
|
inlinestatic |
Creates a new Type 1 font by the byte contents of the corresponding AFM/PFM and PFB files
afm | the contents of the AFM or PFM metrics file |
pfb | the contents of the PFB file |
|
inlinestatic |
Creates a new Type 1 font by the byte contents of the corresponding AFM/PFM and PFB files
afm | the contents of the AFM or PFM metrics file |
pfb | the contents of the PFB file |
cached | specifies whether to cache the created FontProgram or not |
|
inlinestatic |
Creates a new Type 1 font by the corresponding AFM/PFM and PFB files
metricsPath | path to the AFM or PFM metrics file |
binaryPath | path to the contents of the PFB file |
|
inlinestatic |
Creates a new Type 1 font by the corresponding AFM/PFM and PFB files
metricsPath | path to the AFM or PFM metrics file |
binaryPath | path to the contents of the PFB file |
cached | specifies whether to cache the created FontProgram or not |
|
inlinestatic |
Gets a set of registered font names.
|
inlinestatic |
Gets a set of registered font names.
|
inlinestatic |
Checks if a certain font is registered.
fontName | the name of the font that has to be checked. |
|
inlinestatic |
Registers a .ttf, .otf, .afm, .pfm, or a .ttc font file.
Registers a .ttf, .otf, .afm, .pfm, or a .ttc font file. In case if TrueType Collection (.ttc), an additional parameter may be specified defining the index of the font to be registered, e.g. "path/to/font/collection.ttc,0". The index is zero-based.
path | the path to a font file |
|
inlinestatic |
Register a font file and use an alias for the font contained in it.
path | the path to a font file |
alias | the alias you want to use for the font |
|
inlinestatic |
Register all the fonts in a directory.
dir | the directory |
|
inlinestatic |
Register a font by giving explicitly the font family and name.
familyName | the font family |
fullName | the font name |
path | the font path |
|
inlinestatic |
Register fonts in some probable directories.
Register fonts in some probable directories. It usually works in Windows, Linux and Solaris.