HiraokaHyperTools.iTextSharp-LGPL
0.2.5
|
Summary description for BaseFont. More...
Classes | |
class | StreamFont |
Public Member Functions | |
abstract int | GetKerning (int char1, int char2) |
abstract bool | SetKerning (int char1, int char2, int kern) |
virtual int | GetWidth (int char1) |
virtual int | GetWidth (string text) |
int | GetDescent (String text) |
int | GetAscent (String text) |
float | GetDescentPoint (String text, float fontSize) |
float | GetAscentPoint (String text, float fontSize) |
float | GetWidthPointKerned (String text, float fontSize) |
float | GetWidthPoint (string text, float fontSize) |
float | GetWidthPoint (int char1, float fontSize) |
abstract PdfStream | GetFullFontStream () |
abstract float | GetFontDescriptor (int key, float fontSize) |
bool | IsEmbedded () |
bool | IsFontSpecific () |
virtual int | GetUnicodeEquivalent (int c) |
virtual int | GetCidCode (int c) |
abstract bool | HasKernPairs () |
virtual bool | CharExists (int c) |
virtual bool | SetCharAdvance (int c, int advance) |
virtual int[] | GetCharBBox (int c) |
void | CorrectArabicAdvance () |
void | AddSubsetRange (int[] range) |
Static Public Member Functions | |
static BaseFont | CreateFont () |
static BaseFont | CreateFont (String name, String encoding, bool embedded) |
static BaseFont | CreateFont (String name, String encoding, bool embedded, bool forceRead) |
static BaseFont | CreateFont (String name, String encoding, bool embedded, bool cached, byte[] ttfAfm, byte[] pfb) |
static BaseFont | CreateFont (String name, String encoding, bool embedded, bool cached, byte[] ttfAfm, byte[] pfb, bool noThrow) |
static BaseFont | CreateFont (String name, String encoding, bool embedded, bool cached, byte[] ttfAfm, byte[] pfb, bool noThrow, bool forceRead) |
static BaseFont | CreateFont (PRIndirectReference fontRef) |
static string[][] | GetFullFontName (string name, string encoding, byte[] ttfAfm) |
static Object[] | GetAllFontNames (String name, String encoding, byte[] ttfAfm) |
static String[][] | GetAllNameEntries (String name, String encoding, byte[] ttfAfm) |
static string[] | EnumerateTTCNames (string ttcFile) |
static string[] | EnumerateTTCNames (byte[] ttcArray) |
static void | AddToResourceSearch (object obj) |
static Stream | GetResourceStream (string key) |
static ArrayList | GetDocumentFonts (PdfReader reader) |
static ArrayList | GetDocumentFonts (PdfReader reader, int page) |
Static Public Attributes | |
const string | COURIER = "Courier" |
const string | COURIER_BOLD = "Courier-Bold" |
const string | COURIER_OBLIQUE = "Courier-Oblique" |
const string | COURIER_BOLDOBLIQUE = "Courier-BoldOblique" |
const string | HELVETICA = "Helvetica" |
const string | HELVETICA_BOLD = "Helvetica-Bold" |
const string | HELVETICA_OBLIQUE = "Helvetica-Oblique" |
const string | HELVETICA_BOLDOBLIQUE = "Helvetica-BoldOblique" |
const string | SYMBOL = "Symbol" |
const string | TIMES_ROMAN = "Times-Roman" |
const string | TIMES_BOLD = "Times-Bold" |
const string | TIMES_ITALIC = "Times-Italic" |
const string | TIMES_BOLDITALIC = "Times-BoldItalic" |
const string | ZAPFDINGBATS = "ZapfDingbats" |
const int | ASCENT = 1 |
const int | CAPHEIGHT = 2 |
const int | DESCENT = 3 |
const int | ITALICANGLE = 4 |
const int | BBOXLLX = 5 |
const int | BBOXLLY = 6 |
const int | BBOXURX = 7 |
const int | BBOXURY = 8 |
const int | AWT_ASCENT = 9 |
const int | AWT_DESCENT = 10 |
const int | AWT_LEADING = 11 |
const int | AWT_MAXADVANCE = 12 |
const int | UNDERLINE_POSITION = 13 |
const int | UNDERLINE_THICKNESS = 14 |
const int | STRIKETHROUGH_POSITION = 15 |
const int | STRIKETHROUGH_THICKNESS = 16 |
const int | SUBSCRIPT_SIZE = 17 |
const int | SUBSCRIPT_OFFSET = 18 |
const int | SUPERSCRIPT_SIZE = 19 |
const int | SUPERSCRIPT_OFFSET = 20 |
const int | FONT_TYPE_T1 = 0 |
const int | FONT_TYPE_TT = 1 |
const int | FONT_TYPE_CJK = 2 |
const int | FONT_TYPE_TTUNI = 3 |
const int | FONT_TYPE_DOCUMENT = 4 |
const int | FONT_TYPE_T3 = 5 |
const string | IDENTITY_H = "Identity-H" |
const string | IDENTITY_V = "Identity-V" |
const string | CP1250 = "Cp1250" |
const string | CP1252 = "Cp1252" |
const string | CP1257 = "Cp1257" |
const string | WINANSI = "Cp1252" |
const string | MACROMAN = "MacRoman" |
static readonly int[] | CHAR_RANGE_LATIN = {0, 0x17f, 0x2000, 0x206f, 0x20a0, 0x20cf, 0xfb00, 0xfb06} |
static readonly int[] | CHAR_RANGE_ARABIC = {0, 0x7f, 0x0600, 0x067f, 0x20a0, 0x20cf, 0xfb50, 0xfbff, 0xfe70, 0xfeff} |
static readonly int[] | CHAR_RANGE_HEBREW = {0, 0x7f, 0x0590, 0x05ff, 0x20a0, 0x20cf, 0xfb1d, 0xfb4f} |
static readonly int[] | CHAR_RANGE_CYRILLIC = {0, 0x7f, 0x0400, 0x052f, 0x2000, 0x206f, 0x20a0, 0x20cf} |
const bool | EMBEDDED = true |
const bool | NOT_EMBEDDED = false |
const bool | CACHED = true |
const bool | NOT_CACHED = false |
const string | RESOURCE_PATH = "iTextSharp.text.pdf.fonts." |
const char | CID_NEWLINE = '\u7fff' |
const string | notdef = ".notdef" |
Protected Member Functions | |
BaseFont () | |
void | CreateEncoding () |
abstract int[] | GetRawCharBBox (int c, String name) |
Static Protected Member Functions | |
static string | GetBaseName (string name) |
static string | NormalizeEncoding (string enc) |
Protected Attributes | |
ArrayList | subsetRanges |
int[] | widths = new int[256] |
string[] | differences = new string[256] |
char[] | unicodeDifferences = new char[256] |
int[][] | charBBoxes = new int[256][] |
string | encoding |
bool | embedded |
int | compressionLevel = PdfStream.DEFAULT_COMPRESSION |
bool | fontSpecific = true |
bool | forceWidthsOutput = false |
bool | directTextToByte = false |
bool | subset = true |
bool | fastWinansi = false |
IntHashtable | specialMap |
Static Protected Attributes | |
static Hashtable | fontCache = new Hashtable() |
static Hashtable | BuiltinFonts14 = new Hashtable() |
Properties | |
string | Encoding [get] |
int | FontType [get, set] |
abstract string | PostscriptFontName [get, set] |
abstract string[][] | FullFontName [get] |
abstract string[][] | AllNameEntries [get] |
abstract string[][] | FamilyFontName [get] |
virtual string[] | CodePagesSupported [get] |
int[] | Widths [get] |
string[] | Differences [get] |
char[] | UnicodeDifferences [get] |
bool | ForceWidthsOutput [get, set] |
bool | DirectTextToByte [get, set] |
bool | Subset [get, set] |
int | CompressionLevel [get, set] |
Summary description for BaseFont.
|
protected |
Creates new BaseFont
void iTextSharp.text.pdf.BaseFont.AddSubsetRange | ( | int[] | range | ) |
Adds a character range when subsetting. The range is an int
array where the first element is the start range inclusive and the second element is the end range inclusive. Several ranges are allowed in the same array.
range | the character range |
|
static |
|
virtual |
Checks if a character exists in this font.
c | the character to check |
true
if the character has a glyph, false
otherwise Reimplemented in iTextSharp.text.pdf.Type3Font, and iTextSharp.text.pdf.DocumentFont.
void iTextSharp.text.pdf.BaseFont.CorrectArabicAdvance | ( | ) |
iText expects Arabic Diactrics (tashkeel) to have zero advance but some fonts, most notably those that come with Windows, like times.ttf, have non-zero advance for those characters. This method makes those character to have zero width advance and work correctly in the iText Arabic shaping and reordering context.
|
protected |
Creates the widths
and the differences
arrays
UnsupportedEncodingException | the encoding is not supported |
|
static |
Creates a new font. This will always be the default Helvetica font (not embedded). This method is introduced because Helvetica is used in many examples.
IOException | This shouldn't occur ever |
DocumentException | This shouldn't occur ever |
|
static |
Creates a font based on an existing document font. The created font font may not behave as expected, depending on the encoding or subset.
fontRef | the reference to the document font |
|
static |
Creates a new font. This font can be one of the 14 built in types, a Type1 font referred to by an AFM or PFM file, a TrueType font (simple or collection) or a CJK font from the Adobe Asian Font Pack. TrueType fonts and CJK fonts can have an optional style modifier appended to the name. These modifiers are: Bold, Italic and BoldItalic. An example would be "STSong-Light,Bold". Note that this modifiers do not work if the font is embedded. 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.
Besides the common encodings described by name, custom encodings can also be made. These encodings will only work for the single byte fonts Type1 and TrueType. The encoding string starts with a '#' followed by "simple" or "full". If "simple" there is a decimal for the first character position and then a list of hex values representing the Unicode codes that compose that encoding.
The "simple" encoding is recommended for TrueType fonts as the "full" encoding risks not matching the character with the right glyph if not done with care.
The "full" encoding is specially aimed at Type1 fonts where the glyphs have to be described by non standard names like the Tex math fonts. Each group of three elements compose a code position: the one byte code order in decimal or as 'x' (x cannot be the space), the name and the Unicode character used to access the glyph. The space must be assigned to character position 32 otherwise text justification will not work.
Example for a "simple" encoding that includes the Unicode character space, A, B and ecyrillic:
"# simple 32 0020 0041 0042 0454"
<P<blockquote>
Example for a "full" encoding for a Type1 Tex font:
"# full 'A' nottriangeqlleft 0041 'B' dividemultiply 0042 32 space 0020"
<P<blockquote>
This method calls:
createFont(name, encoding, embedded, true, null, null);
name | the name of the font or its location on file |
encoding | the encoding to be applied to this font |
embedded | true if the font is to be embedded in the PDF |
DocumentException | the font is invalid |
IOException | the font file could not be read |
|
static |
Creates a new font. This font can be one of the 14 built in types, a Type1 font referred to by an AFM or PFM file, a TrueType font (simple or collection) or a CJK font from the Adobe Asian Font Pack. TrueType fonts and CJK fonts can have an optional style modifier appended to the name. These modifiers are: Bold, Italic and BoldItalic. An example would be "STSong-Light,Bold". Note that this modifiers do not work if the font is embedded. 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 may or may not be cached depending on the flag cached
. If the byte
arrays are present the font will be read from them instead of the name. A name is still required to identify the font type.
Besides the common encodings described by name, custom encodings can also be made. These encodings will only work for the single byte fonts Type1 and TrueType. The encoding string starts with a '#' followed by "simple" or "full". If "simple" there is a decimal for the first character position and then a list of hex values representing the Unicode codes that compose that encoding.
The "simple" encoding is recommended for TrueType fonts as the "full" encoding risks not matching the character with the right glyph if not done with care.
The "full" encoding is specially aimed at Type1 fonts where the glyphs have to be described by non standard names like the Tex math fonts. Each group of three elements compose a code position: the one byte code order in decimal or as 'x' (x cannot be the space), the name and the Unicode character used to access the glyph. The space must be assigned to character position 32 otherwise text justification will not work.
Example for a "simple" encoding that includes the Unicode character space, A, B and ecyrillic:
"# simple 32 0020 0041 0042 0454"
<P<blockquote>
Example for a "full" encoding for a Type1 Tex font:
"# full 'A' nottriangeqlleft 0041 'B' dividemultiply 0042 32 space 0020"
name | the name of the font or its location on file |
encoding | the encoding to be applied to this font |
embedded | true if the font is to be embedded in the PDF |
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 |
ttfAfm | the true type font or the afm in a byte array |
pfb | the pfb in a byte array |
DocumentException | the font is invalid |
IOException | the font file could not be read |
|
static |
Creates a new font. This font can be one of the 14 built in types, a Type1 font referred to by an AFM or PFM file, a TrueType font (simple or collection) or a CJK font from the Adobe Asian Font Pack. TrueType fonts and CJK fonts can have an optional style modifier appended to the name. These modifiers are: Bold, Italic and BoldItalic. An example would be "STSong-Light,Bold". Note that this modifiers do not work if the font is embedded. 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 may or may not be cached depending on the flag cached
. If the byte
arrays are present the font will be read from them instead of the name. A name is still required to identify the font type.
Besides the common encodings described by name, custom encodings can also be made. These encodings will only work for the single byte fonts Type1 and TrueType. The encoding string starts with a '#' followed by "simple" or "full". If "simple" there is a decimal for the first character position and then a list of hex values representing the Unicode codes that compose that encoding.
The "simple" encoding is recommended for TrueType fonts as the "full" encoding risks not matching the character with the right glyph if not done with care.
The "full" encoding is specially aimed at Type1 fonts where the glyphs have to be described by non standard names like the Tex math fonts. Each group of three elements compose a code position: the one byte code order in decimal or as 'x' (x cannot be the space), the name and the Unicode character used to access the glyph. The space must be assigned to character position 32 otherwise text justification will not work.
Example for a "simple" encoding that includes the Unicode character space, A, B and ecyrillic:
"# simple 32 0020 0041 0042 0454"
<P<blockquote>
Example for a "full" encoding for a Type1 Tex font:
"# full 'A' nottriangeqlleft 0041 'B' dividemultiply 0042 32 space 0020"
name | the name of the font or its location on file |
encoding | the encoding to be applied to this font |
embedded | true if the font is to be embedded in the PDF |
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 |
ttfAfm | the true type font or the afm in a byte array |
pfb | the pfb in a byte array |
noThrow | if true will not throw an exception if the font is not recognized and will return null, if false will throw an exception if the font is not recognized. Note that even if true an exception may be thrown in some circumstances. This parameter is useful for FontFactory that may have to check many invalid font names before finding the right one |
DocumentException | the font is invalid |
IOException | the font file could not be read |
|
static |
Creates a new font. This font can be one of the 14 built in types, a Type1 font referred to by an AFM or PFM file, a TrueType font (simple or collection) or a CJK font from the Adobe Asian Font Pack. TrueType fonts and CJK fonts can have an optional style modifier appended to the name. These modifiers are: Bold, Italic and BoldItalic. An example would be "STSong-Light,Bold". Note that this modifiers do not work if the font is embedded. 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 may or may not be cached depending on the flag cached
. If the byte
arrays are present the font will be read from them instead of the name. A name is still required to identify the font type.
Besides the common encodings described by name, custom encodings can also be made. These encodings will only work for the single byte fonts Type1 and TrueType. The encoding string starts with a '#' followed by "simple" or "full". If "simple" there is a decimal for the first character position and then a list of hex values representing the Unicode codes that compose that encoding.
The "simple" encoding is recommended for TrueType fonts as the "full" encoding risks not matching the character with the right glyph if not done with care.
The "full" encoding is specially aimed at Type1 fonts where the glyphs have to be described by non standard names like the Tex math fonts. Each group of three elements compose a code position: the one byte code order in decimal or as 'x' (x cannot be the space), the name and the Unicode character used to access the glyph. The space must be assigned to character position 32 otherwise text justification will not work.
Example for a "simple" encoding that includes the Unicode character space, A, B and ecyrillic:
"# simple 32 0020 0041 0042 0454"
<P<blockquote>
Example for a "full" encoding for a Type1 Tex font:
"# full 'A' nottriangeqlleft 0041 'B' dividemultiply 0042 32 space 0020"
name | the name of the font or its location on file |
encoding | the encoding to be applied to this font |
embedded | true if the font is to be embedded in the PDF |
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 |
ttfAfm | the true type font or the afm in a byte array |
pfb | the pfb in a byte array |
noThrow | if true will not throw an exception if the font is not recognized and will return null, if false will throw an exception if the font is not recognized. Note that even if true an exception may be thrown in some circumstances. This parameter is useful for FontFactory that may have to check many invalid font names before finding the right one |
forceRead | in some cases (TrueTypeFont, Type1Font), the full font file will be read and kept in memory if forceRead is true |
DocumentException | the font is invalid |
IOException | the font file could not be read |
|
static |
Creates a new font. This font can be one of the 14 built in types, a Type1 font referred to by an AFM or PFM file, a TrueType font (simple or collection) or a CJK font from the Adobe Asian Font Pack. TrueType fonts and CJK fonts can have an optional style modifier appended to the name. These modifiers are: Bold, Italic and BoldItalic. An example would be "STSong-Light,Bold". Note that this modifiers do not work if the font is embedded. 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.
Besides the common encodings described by name, custom encodings can also be made. These encodings will only work for the single byte fonts Type1 and TrueType. The encoding string starts with a '#' followed by "simple" or "full". If "simple" there is a decimal for the first character position and then a list of hex values representing the Unicode codes that compose that encoding.
The "simple" encoding is recommended for TrueType fonts as the "full" encoding risks not matching the character with the right glyph if not done with care.
The "full" encoding is specially aimed at Type1 fonts where the glyphs have to be described by non standard names like the Tex math fonts. Each group of three elements compose a code position: the one byte code order in decimal or as 'x' (x cannot be the space), the name and the Unicode character used to access the glyph. The space must be assigned to character position 32 otherwise text justification will not work.
Example for a "simple" encoding that includes the Unicode character space, A, B and ecyrillic:
"# simple 32 0020 0041 0042 0454"
<P<blockquote>
Example for a "full" encoding for a Type1 Tex font:
"# full 'A' nottriangeqlleft 0041 'B' dividemultiply 0042 32 space 0020"
<P<blockquote>
This method calls:
createFont(name, encoding, embedded, true, null, null);
name | the name of the font or its location on file |
encoding | the encoding to be applied to this font |
embedded | true if the font is to be embedded in the PDF |
forceRead | in some cases (TrueTypeFont, Type1Font), the full font file will be read and kept in memory if forceRead is true |
DocumentException | the font is invalid |
IOException | the font file could not be read |
|
static |
Enumerates the postscript font names present inside a True Type Collection.
ttcArray | the font as a byte array |
DocumentException | on error |
IOException | on error |
|
static |
Enumerates the postscript font names present inside a True Type Collection.
ttcFile | the file name of the font |
DocumentException | on error |
IOException | on error |
|
static |
Gets all the names from the font. Only the required tables are read.
name | the name of the font |
encoding | the encoding of the font |
ttfAfm | the true type font or the afm in a byte array |
DocumentException | on error |
IOException | on error |
|
static |
Gets all the entries of the namestable from the font. Only the required tables are read.
name | the name of the font |
encoding | the encoding of the font |
ttfAfm | the true type font or the afm in a byte array |
DocumentException | on error |
IOException | on error |
int iTextSharp.text.pdf.BaseFont.GetAscent | ( | String | text | ) |
Gets the ascent of a String
in normalized 1000 units. The ascent will always be greater than or equal to zero even if all the characters have a lower ascent.
text | the String to get the ascent of |
float iTextSharp.text.pdf.BaseFont.GetAscentPoint | ( | String | text, |
float | fontSize | ||
) |
Gets the ascent of a String
in points. The ascent will always be greater than or equal to zero even if all the characters have a lower ascent.
text | the String to get the ascent of |
fontSize | the size of the font |
|
staticprotected |
Gets the name without the modifiers Bold, Italic or BoldItalic.
name | the full name of the font |
|
virtual |
Gets the smallest box enclosing the character contours. It will return null
if the font has not the information or the character has no contours, as in the case of the space, for example. Characters with no contours may also return [0,0,0,0].
c | the character to get the contour bounding box from |
null
Reimplemented in iTextSharp.text.pdf.Type3Font, and iTextSharp.text.pdf.DocumentFont.
|
virtual |
Gets the CID code given an Unicode. It has only meaning with CJK fonts.
c | the Unicode |
int iTextSharp.text.pdf.BaseFont.GetDescent | ( | String | text | ) |
Gets the descent of a String
in normalized 1000 units. The descent will always be less than or equal to zero even if all the characters have an higher descent.
text | the String to get the descent of |
float iTextSharp.text.pdf.BaseFont.GetDescentPoint | ( | String | text, |
float | fontSize | ||
) |
Gets the descent of a String
in points. The descent will always be less than or equal to zero even if all the characters have an higher descent.
text | the String to get the descent of |
fontSize | the size of the font |
|
static |
Gets a list of all document fonts. Each element of the ArrayList
contains a Object[]{String,PRIndirectReference}
with the font name and the indirect reference to it.
reader | the document where the fonts are to be listed from |
|
static |
Gets a list of the document fonts in a particular page. Each element of the ArrayList
contains a Object[]{String,PRIndirectReference}
with the font name and the indirect reference to it.
reader | the document where the fonts are to be listed from |
page | the page to list the fonts from |
|
pure virtual |
Gets the font parameter identified by key
. Valid values for key
are ASCENT
, CAPHEIGHT
, DESCENT
, ITALICANGLE
, BBOXLLX
, BBOXLLY
, BBOXURX
and BBOXURY
.
key | the parameter to be extracted |
fontSize | the font size in points |
Implemented in iTextSharp.text.pdf.Type3Font, and iTextSharp.text.pdf.DocumentFont.
|
static |
Gets the full name of the font. If it is a True Type font each array element will have {Platform ID, Platform Encoding ID, Language ID, font name}. The interpretation of this values can be found in the Open Type specification, chapter 2, in the 'name' table.
For the other fonts the array has a single element with {"", "", "", font name}.
name | the name of the font |
encoding | the encoding of the font |
ttfAfm | the true type font or the afm in a byte array |
DocumentException | on error |
IOException | on error |
|
pure virtual |
Returns a PdfStream object with the full font program (if possible). This method will return null for some types of fonts (CJKFont, Type3Font) or if there is no font program available (standard Type 1 fonts).
Implemented in iTextSharp.text.pdf.Type3Font, and iTextSharp.text.pdf.DocumentFont.
|
pure virtual |
Gets the kerning between two Unicode chars.
char1 | the first char |
char2 | the second char |
Implemented in iTextSharp.text.pdf.Type3Font, and iTextSharp.text.pdf.DocumentFont.
|
protectedpure virtual |
Implemented in iTextSharp.text.pdf.Type3Font, and iTextSharp.text.pdf.DocumentFont.
|
static |
Gets the font resources.
key | the name of the resource |
Stream
to get the resource or null
if not found
|
virtual |
Gets the Unicode equivalent to a CID. The (inexistent) CID <FF00> is translated as '
'. It has only meaning with CJK fonts with Identity encoding.
c | the CID code |
|
virtual |
Gets the width of a char
in normalized 1000 units.
char1 | the unicode char to get the width of |
Reimplemented in iTextSharp.text.pdf.Type3Font, and iTextSharp.text.pdf.DocumentFont.
|
virtual |
Gets the width of a string
in normalized 1000 units.
text | the string to get the witdth of |
float iTextSharp.text.pdf.BaseFont.GetWidthPoint | ( | int | char1, |
float | fontSize | ||
) |
Gets the width of a char
in points.
char1 | the char to get the witdth of |
fontSize | the font size |
float iTextSharp.text.pdf.BaseFont.GetWidthPoint | ( | string | text, |
float | fontSize | ||
) |
Gets the width of a string
in points.
text | the string to get the witdth of |
fontSize | the font size |
float iTextSharp.text.pdf.BaseFont.GetWidthPointKerned | ( | String | text, |
float | fontSize | ||
) |
Gets the width of a String
in points taking kerning into account.
text | the String to get the witdth of |
fontSize | the font size |
|
pure virtual |
Checks if the font has any kerning pairs.
true
if the font has any kerning pairs Implemented in iTextSharp.text.pdf.Type3Font, and iTextSharp.text.pdf.DocumentFont.
bool iTextSharp.text.pdf.BaseFont.IsEmbedded | ( | ) |
Gets the embedded flag.
true
if the font is embedded. bool iTextSharp.text.pdf.BaseFont.IsFontSpecific | ( | ) |
Gets the symbolic flag of the font.
true
if the font is symbolic
|
staticprotected |
Normalize the encoding names. "winansi" is changed to "Cp1252" and "macroman" is changed to "MacRoman".
enc | the encoding to be normalized |
|
virtual |
Sets the character advance.
c | the character |
advance | the character advance normalized to 1000 units |
true
if the advance was set, false
otherwise Reimplemented in iTextSharp.text.pdf.Type3Font.
|
pure virtual |
Sets the kerning between two Unicode chars.
char1 | the first char |
char2 | the second char |
kern | the kerning to apply in normalized 1000 units |
true
if the kerning was applied, false
otherwise Implemented in iTextSharp.text.pdf.Type3Font, and iTextSharp.text.pdf.DocumentFont.
|
static |
The maximum height above the baseline reached by glyphs in this font, excluding the height of glyphs for accented characters.
|
static |
java.awt.Font property
|
static |
java.awt.Font property
|
static |
java.awt.Font property
|
static |
java.awt.Font property
|
static |
The lower left x glyph coordinate.
|
static |
The lower left y glyph coordinate.
|
static |
The upper right x glyph coordinate.
|
static |
The upper right y glyph coordinate.
|
staticprotected |
list of the 14 built in fonts.
|
static |
if the font has to be cached
|
static |
The y coordinate of the top of flat capital letters, measured from the baseline.
|
static |
|
static |
|
static |
|
static |
|
protected |
|
static |
The fake CID code that represents a newline.
|
protected |
The compression level for the font stream.
|
static |
This is a possible value of a base 14 type 1 font
|
static |
This is a possible value of a base 14 type 1 font
|
static |
This is a possible value of a base 14 type 1 font
|
static |
This is a possible value of a base 14 type 1 font
|
static |
A possible encoding.
|
static |
A possible encoding.
|
static |
A possible encoding.
|
static |
The maximum depth below the baseline reached by glyphs in this font. The value is a negative number.
|
protected |
encoding names
|
protected |
Converts char
directly to byte
by casting.
|
static |
if the font has to be embedded
|
protected |
true if the font is to be embedded in the PDF
|
protected |
encoding used with this font
|
protected |
|
static |
The font is CJK.
|
static |
A font already inside the document.
|
static |
The font is Type 1.
|
static |
A Type3 font.
|
static |
The font is True Type with a standard encoding.
|
static |
The font is True Type with a Unicode encoding.
|
staticprotected |
cache for the fonts already used.
|
protected |
true if the font must use its built in encoding. In that case the encoding
is only used to map a char to the position inside the font, not to the expected char name.
|
protected |
Forces the output of the width array. Only matters for the 14 built-in fonts.
|
static |
This is a possible value of a base 14 type 1 font
|
static |
This is a possible value of a base 14 type 1 font
|
static |
This is a possible value of a base 14 type 1 font
|
static |
This is a possible value of a base 14 type 1 font
|
static |
The Unicode encoding with horizontal writing.
|
static |
The Unicode encoding with vertical writing.
|
static |
The angle, expressed in degrees counterclockwise from the vertical, of the dominant vertical strokes of the font. The value is negative for fonts that slope to the right, as almost all italic fonts do.
|
static |
A possible encoding.
|
static |
if the font doesn't have to be cached
|
static |
if the font doesn't have to be embedded
|
static |
a not defined character in a custom PDF encoding
|
static |
The path to the font resources.
|
protected |
Custom encodings use this map to key the Unicode character to the single byte code.
|
static |
The strikethrough position.
|
static |
The strikethrough thickness.
|
static |
The recommended vertical offset from the baseline for subscripts for this font. Usually a negative value.
|
static |
The recommended vertical size for subscripts for this font.
|
protected |
Indicates if all the glyphs and widths for that particular encoding should be included in the document.
|
protected |
|
static |
The recommended vertical offset from the baseline for superscripts for this font.
|
static |
The recommended vertical size for superscripts for this font.
|
static |
This is a possible value of a base 14 type 1 font
|
static |
This is a possible value of a base 14 type 1 font
|
static |
This is a possible value of a base 14 type 1 font
|
static |
This is a possible value of a base 14 type 1 font
|
static |
This is a possible value of a base 14 type 1 font
|
static |
The underline position. Usually a negative value.
|
static |
The underline thickness.
|
protected |
same as differences but with the unicode codes
|
protected |
table of characters widths for this encoding
|
static |
A possible encoding.
|
static |
This is a possible value of a base 14 type 1 font
|
get |
Gets all the entries of the names-table. If it is a True Type font each array element will have {Name ID, Platform ID, Platform Encoding ID, Language ID, font name}. The interpretation of this values can be found in the Open Type specification, chapter 2, in the 'name' table.
For the other fonts the array has a single element with {"4", "", "", "", font name}.
|
get |
Gets the code pages supported by the font. This has only meaning with True Type fonts.
|
getset |
Sets the compression level to be used for the font streams.
compressionLevel | a value between 0 (best speed) and 9 (best compression) |
|
get |
Gets the array with the names of the characters.
|
getset |
Sets the conversion of char
directly to byte
by casting. This is a low level feature to put the bytes directly in the content stream without passing through string.GetBytes().
directTextToByte | New value of property directTextToByte. |
|
get |
Gets the encoding used to convert string
into byte[]
.
|
get |
Gets the family name of the font. If it is a True Type font each array element will have {Platform ID, Platform Encoding ID, Language ID, font name}. The interpretation of this values can be found in the Open Type specification, chapter 2, in the 'name' table.
For the other fonts the array has a single element with {"", "", "", font name}.
|
getset |
Gets the font type. The font types can be: FONT_TYPE_T1, FONT_TYPE_TT, FONT_TYPE_CJK and FONT_TYPE_TTUNI.
|
getset |
Set to true
to force the generation of the widths array.
forceWidthsOutput | true to force the generation of the widths array |
|
get |
Gets the full name of the font. If it is a True Type font each array element will have {Platform ID, Platform Encoding ID, Language ID, font name}. The interpretation of this values can be found in the Open Type specification, chapter 2, in the 'name' table.
For the other fonts the array has a single element with {"", "", "", font name}.
|
getset |
Gets the postscript font name.
|
getset |
Indicates if all the glyphs and widths for that particular encoding should be included in the document. When set to true
only the glyphs used will be included in the font. When set to false
and addSubsetRange(int[]) was not called the full font will be included otherwise just the characters ranges will be included.
subset | new value of property subset |
|
get |
Gets the array with the unicode characters.
|
get |
Gets the font width array.