iText 8.0.5 API
|
Public Member Functions |
|
abstract Glyph | GetGlyph (int unicode) |
Get glyph by unicode More... |
|
virtual bool | ContainsGlyph (int unicode) |
Check whether font contains glyph with specified unicode. More... |
|
abstract GlyphLine | CreateGlyphLine (String content) |
abstract int | AppendGlyphs (String text, int from, int to, IList< Glyph > glyphs) |
Append all supported glyphs and return number of processed chars. More... |
|
abstract int | AppendAnyGlyph (String text, int from, IList< Glyph > glyphs) |
Append any single glyph, even notdef. More... |
|
abstract byte[] | ConvertToBytes (String text) |
Converts the text into bytes to be placed in the document. More... |
|
abstract byte[] | ConvertToBytes (GlyphLine glyphLine) |
abstract String | Decode (PdfString content) |
abstract GlyphLine | DecodeIntoGlyphLine (PdfString characterCodes) |
Decodes sequence of character codes (e.g. from content stream) into a iText.IO.Font.Otf.GlyphLine More... |
|
virtual bool | AppendDecodedCodesToGlyphsList (IList< Glyph > list, PdfString characterCodes) |
Decodes sequence of character codes (e.g. from content stream) to sequence of glyphs and appends them to the passed list. More... |
|
abstract float | GetContentWidth (PdfString content) |
abstract byte[] | ConvertToBytes (Glyph glyph) |
abstract void | WriteText (GlyphLine text, int from, int to, PdfOutputStream stream) |
abstract void | WriteText (String text, PdfOutputStream stream) |
virtual int | GetWidth (int unicode) |
Returns the width of a certain character of this font in 1000 normalized units. More... |
|
virtual float | GetWidth (int unicode, float fontSize) |
Returns the width of a certain character of this font in points. More... |
|
virtual int | GetWidth (String text) |
Returns the width of a string of this font in 1000 normalized units. More... |
|
virtual float | GetWidth (String text, float fontSize) |
Gets the width of a String in points. More... |
|
virtual float | GetDescent (String text, float fontSize) |
Gets the descent of a String in points. More... |
|
virtual float | GetDescent (int unicode, float fontSize) |
Gets the descent of a char code in points. More... |
|
virtual float | GetAscent (String text, float fontSize) |
Gets the ascent of a String in points. More... |
|
virtual float | GetAscent (int unicode, float fontSize) |
Gets the ascent of a char code in normalized 1000 units. More... |
|
virtual FontProgram | GetFontProgram () |
virtual bool | IsEmbedded () |
virtual bool | IsSubset () |
Indicates if all the glyphs and widths for that particular encoding should be included in the document. More... |
|
virtual void | SetSubset (bool subset) |
Indicates if all the glyphs and widths for that particular encoding should be included in the document. More... |
|
virtual void | AddSubsetRange (int[] range) |
Adds a character range when subsetting. More... |
|
virtual IList< String > | SplitString (String text, float fontSize, float maxWidth) |
virtual bool | IsBuiltWith (String fontProgram, String encoding) |
Checks whether the PdfFont was built with corresponding fontProgram and encoding or CMAP. More... |
|
override void | Flush () |
To manually flush a PdfObject behind this wrapper, you have to ensure that this object is added to the document, i.e. it has an indirect reference. More... |
|
override String | ToString () |
Public Member Functions inherited from iText.Kernel.Pdf.PdfObjectWrapper< PdfDictionary > | |
virtual T | GetPdfObject () |
virtual iText.Kernel.Pdf.PdfObjectWrapper< T > | MakeIndirect (PdfDocument document, PdfIndirectReference reference) |
Marks object behind wrapper to be saved as indirect. More... |
|
virtual iText.Kernel.Pdf.PdfObjectWrapper< T > | MakeIndirect (PdfDocument document) |
Marks object behind wrapper to be saved as indirect. More... |
|
virtual iText.Kernel.Pdf.PdfObjectWrapper< T > | SetModified () |
virtual bool | IsFlushed () |
Static Public Attributes |
|
const int | SIMPLE_FONT_MAX_CHAR_CODE_VALUE = 255 |
The upper bound value for char code. More... |
|
Package Functions |
|
PdfFont (PdfDictionary fontDictionary) | |
abstract PdfDictionary | GetFontDescriptor (String fontName) |
override bool | IsWrappedObjectMustBeIndirect () |
Defines if the object behind this wrapper must be an indirect object in the resultant document. More... |
|
virtual PdfStream | GetPdfFontStream (byte[] fontStreamBytes, int[] fontStreamLengths) |
Create PdfStream based on fontStreamBytes . More... |
|
Package Functions inherited from iText.Kernel.Pdf.PdfObjectWrapper< PdfDictionary > | |
PdfObjectWrapper (T pdfObject) | |
virtual void | SetPdfObject (T pdfObject) |
virtual void | SetForbidRelease () |
virtual void | UnsetForbidRelease () |
virtual void | EnsureUnderlyingObjectHasIndirectReference () |
Static Package Functions |
|
static String | UpdateSubsetPrefix (String fontName, bool isSubset, bool isEmbedded) |
Adds a unique subset prefix to be added to the font name when the font is embedded and subsetted. More... |
|
Static Package Functions inherited from iText.Kernel.Pdf.PdfObjectWrapper< PdfDictionary > | |
static void | MarkObjectAsIndirect (PdfObject pdfObject) |
static void | EnsureObjectIsAddedToDocument (PdfObject @object) |
Some wrappers use object's indirect reference to obtain the PdfDocument to which the object belongs to. More... |
|
Package Attributes |
|
FontProgram | fontProgram |
IDictionary< int, Glyph > | notdefGlyphs = new Dictionary |
bool | newFont = true |
false, if the font comes from PdfDocument. More... |
|
bool | embedded = false |
true if the font is to be embedded in the PDF. More... |
|
bool | subset = true |
Indicates if all the glyphs and widths for that particular encoding should be included in the document. More... |
|
IList< int[]> | subsetRanges |
Static Package Attributes |
|
static readonly byte[] | EMPTY_BYTES = new byte[0] |
|
inlinevirtual |
Adds a character range when subsetting.
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. Note, #setSubset(true) will be called implicitly therefore this range is an addition to the used glyphs.
range | the character range |
|
pure virtual |
Append any single glyph, even notdef.
Append any single glyph, even notdef. Returns number of processed chars: 2 in case surrogate pair, otherwise 1.
text | String to convert to glyphs. |
from | from index of the text. |
glyphs | array for a new glyph, shall not be null. |
Implemented in iText.Kernel.Font.PdfType0Font, and iText.Kernel.Font.PdfSimpleFont< T >.
|
inlinevirtual |
Decodes sequence of character codes (e.g. from content stream) to sequence of glyphs and appends them to the passed list.
list | the list to the end of which decoded glyphs are to be added |
characterCodes | the string which is interpreted as a sequence of character codes. Note, that iText.Kernel.Pdf.PdfString acts as a storage for char code values specific to given font, therefore individual character codes must not be interpreted as code units of the UTF-16 encoding |
Reimplemented in iText.Kernel.Font.PdfType0Font, and iText.Kernel.Font.PdfSimpleFont< T >.
|
pure virtual |
Append all supported glyphs and return number of processed chars.
Append all supported glyphs and return number of processed chars. Composite font supports surrogate pairs.
text | String to convert to glyphs. |
from | from index of the text. |
to | to index of the text. |
glyphs | array for a new glyphs, shall not be null. |
Implemented in iText.Kernel.Font.PdfType0Font, and iText.Kernel.Font.PdfSimpleFont< T >.
|
inlinevirtual |
Check whether font contains glyph with specified unicode.
unicode | a unicode code point |
Reimplemented in iText.Kernel.Font.PdfType0Font.
|
pure virtual |
Converts the text into bytes to be placed in the document.
Converts the text into bytes to be placed in the document. The conversion is done according to the font and the encoding and the characters used are stored.
text | the text to convert |
Implemented in iText.Kernel.Font.PdfType0Font, and iText.Kernel.Font.PdfSimpleFont< T >.
|
pure virtual |
Decodes sequence of character codes (e.g. from content stream) into a iText.IO.Font.Otf.GlyphLine
characterCodes | the string which is interpreted as a sequence of character codes. Note, that iText.Kernel.Pdf.PdfString acts as a storage for char code values specific to given font, therefore individual character codes must not be interpreted as code units of the UTF-16 encoding |
Implemented in iText.Kernel.Font.PdfSimpleFont< T >, and iText.Kernel.Font.PdfType0Font.
|
inlinevirtual |
To manually flush a PdfObject
behind this wrapper, you have to ensure that this object is added to the document, i.e. it has an indirect reference.
To manually flush a PdfObject
behind this wrapper, you have to ensure that this object is added to the document, i.e. it has an indirect reference. Basically this means that before flushing you need to explicitly call iText.Kernel.Pdf.PdfObjectWrapper
Reimplemented from iText.Kernel.Pdf.PdfObjectWrapper< PdfDictionary >.
Reimplemented in iText.Kernel.Font.PdfType0Font.
|
inlinevirtual |
Gets the ascent of a char code in normalized 1000 units.
Gets the ascent of a char code in normalized 1000 units. The ascent will always be greater than or equal to zero even if all the characters have a lower ascent.
unicode | the char code to get the ascent of |
fontSize | the font size |
|
inlinevirtual |
Gets the ascent of a String
in points.
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 font size |
|
inlinevirtual |
Gets the descent of a char code in points.
Gets the descent of a char code in points. The descent will always be less than or equal to zero even if all the characters have a higher descent.
unicode | the char code to get the descent of |
fontSize | the font size |
|
inlinevirtual |
Gets the descent of a String
in points.
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 a higher descent.
text | the String to get the descent of |
fontSize | the font size |
|
pure virtual |
Get glyph by unicode
unicode | a unicode code point |
iText.IO.Font.Otf.Glyph if it exists or .NOTDEF if supported, otherwise null
.
Implemented in iText.Kernel.Font.PdfType0Font.
|
inlinepackagevirtual |
Create PdfStream
based on fontStreamBytes .
fontStreamBytes | original font data, must be not null. |
fontStreamLengths | array to generate Length* keys, must be not null. |
null
, if there is an error reading the font.
|
inlinevirtual |
Returns the width of a certain character of this font in 1000 normalized units.
unicode | a certain character. |
|
inlinevirtual |
Returns the width of a certain character of this font in points.
unicode | a certain character. |
fontSize | the font size. |
|
inlinevirtual |
Returns the width of a string of this font in 1000 normalized units.
text | a string content. |
|
inlinevirtual |
Gets the width of a String
in points.
text | the String to get the width of |
fontSize | the font size |
|
inlinevirtual |
Checks whether the PdfFont was built with corresponding fontProgram and encoding or CMAP.
Checks whether the PdfFont was built with corresponding fontProgram and encoding or CMAP. Default value is false unless overridden.
fontProgram | a font name or path to a font program |
encoding | an encoding or CMAP |
Reimplemented in iText.Kernel.Font.PdfType0Font, and iText.Kernel.Font.PdfSimpleFont< T >.
|
inlinevirtual |
Indicates if all the glyphs and widths for that particular encoding should be included in the document.
false
to include all the glyphs and widths.
|
inlinepackagevirtual |
Defines if the object behind this wrapper must be an indirect object in the resultant document.
Defines if the object behind this wrapper must be an indirect object in the resultant document.
If this method returns true it doesn't necessarily mean that object must be in the indirect state at any moment, but rather defines that when the object will be written to the document it will be transformed into indirect object if it's not indirect yet.
Return value of this method shouldn't depend on any logic, it should return always true or false.
Implements iText.Kernel.Pdf.PdfObjectWrapper< PdfDictionary >.
|
inlinevirtual |
Indicates if all the glyphs and widths for that particular encoding should be included in the document.
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
the full font will be included and all subset ranges will be removed.
subset | new value of property subset |
|
inlinestaticpackage |
Adds a unique subset prefix to be added to the font name when the font is embedded and subsetted.
fontName | the original font name. |
isSubset | denotes whether font in question is subsetted, i.e. only used symbols are kept in it. |
isEmbedded | denotes whether font in question is embedded into the PDF document. |
|
package |
true if the font is to be embedded in the PDF.
|
package |
false, if the font comes from PdfDocument.
|
static |
The upper bound value for char code.
The upper bound value for char code. As for simple fonts char codes are a single byte values, it may vary from 0 to 255.
|
package |
Indicates if all the glyphs and widths for that particular encoding should be included in the document.