iText 9.8.0 API
iText.Kernel.Font.DocTrueTypeFont Class Reference
Inheritance diagram for iText.Kernel.Font.DocTrueTypeFont:
iText.IO.Font.TrueTypeFont iText.IO.Font.FontProgram

Public Member Functions

virtual PdfStream  GetFontFile ()
 
virtual PdfName  GetFontFileName ()
 
virtual PdfName  GetSubtype ()
 
override bool  IsBuiltWith (String fontName)
  Returns false, because we cannot rely on an actual font subset and font name. More...
 
virtual int  GetMissingWidth ()
 
- Public Member Functions inherited from iText.IO.Font.TrueTypeFont
  TrueTypeFont (String path)
  Loads a standalone OpenType or TrueType font from a path. More...
 
  TrueTypeFont (byte[] ttf)
  Loads a standalone OpenType or TrueType font from its binary contents. More...
 
  TrueTypeFont (byte[] ttf, bool isLenientMode)
  Loads a font from binary contents. More...
 
override bool  HasKernPairs ()
  Checks whether this program supplies kerning pairs. More...
 
override int  GetKerning (Glyph first, Glyph second)
  Gets the kerning between two glyphs. More...
 
virtual bool  IsCff ()
  Checks whether this OpenType font stores a CFF table. More...
 
virtual IDictionary< int, int[]>  GetActiveCmap ()
  Gets the preferred character-to-glyph CMap selected from the font. More...
 
virtual byte[]  GetFontStreamBytes ()
  Gets the bytes of the font. More...
 
override int  GetPdfFontFlags ()
  Computes the PDF font descriptor flags for this program. More...
 
virtual int  GetDirectoryOffset ()
  The offset from the start of the file to the table directory. More...
 
virtual GlyphSubstitutionTableReader  GetGsubTable ()
  Gets the GSUB table reader. More...
 
virtual GlyphPositioningTableReader  GetGposTable ()
  Gets the GPOS table reader. More...
 
virtual OpenTypeGdefTableReader  GetGdefTable ()
  Gets the GDEF table reader. More...
 
virtual byte[]  GetSubset (ICollection< int > glyphs, bool subsetTables)
  Gets subset based on the passed glyphs. More...
 
virtual Tuple2< int, byte[]>  Subset (ICollection< int > glyphs, bool subsetTables)
  Gets subset and a number of glyphs in it based on the passed glyphs. More...
 
virtual ICollection< int >  MapGlyphsCidsToGids (ICollection< int > glyphs)
  Maps a set of glyph CIDs (as used in PDF file) to corresponding GID values (as a glyph primary identifier in the font file). More...
 
virtual bool  IsCmapPresent (int platformID, int encodingID)
  Checks whether current TrueTypeFont program contains the “cmap” subtable with provided platform ID and encoding ID. More...
 
virtual int  GetNumberOfCmaps ()
  Gets the number of the “cmap” subtables for the current TrueTypeFont program. More...
 
virtual String  ExtractFeatures (ICollection< String > otfScriptTags, IDictionary< String, IList< OpenTableLookup >> extractedFeatures)
  Extracts features from GSUB and GPOS tables based on the passed script tags. More...
 
virtual String[]  GetCodePagesSupported ()
  Gets the code pages supported by the font. More...
 
virtual void  Close ()
  Closes the underlying font parser and releases its source data. More...
 
virtual void  UpdateUsedGlyphs (SortedSet< int > usedGlyphs, bool subset, IList< int[]> subsetRanges)
  The method will update usedGlyphs with additional range or with all glyphs if there is no subset. More...
 
virtual void  UpdateUsedGlyphs (IDictionary< int, Glyph > usedGlyphs, bool subset, IList< int[]> subsetRanges)
  The method will update usedGlyphs with additional range or with all glyphs if there is no subset. More...
 
- Public Member Functions inherited from iText.IO.Font.FontProgram
virtual int  CountOfGlyphs ()
  Gets the amount of glyphs in this font program. More...
 
virtual FontNames  GetFontNames ()
  Gets the parsed font naming data. More...
 
virtual FontMetrics  GetFontMetrics ()
  Gets the parsed font metric data. More...
 
virtual FontIdentification  GetFontIdentification ()
  Gets the parsed font identification data. More...
 
virtual String  GetRegistry ()
  Gets the CID registry name. More...
 
virtual bool  IsFontSpecific ()
  Checks whether this program uses its built-in character encoding. More...
 
virtual int  GetWidth (int unicode)
  Get glyph's width. More...
 
virtual int  GetAvgWidth ()
  Gets the average glyph width. More...
 
virtual int[]  GetCharBBox (int unicode)
  Get glyph's bbox. More...
 
virtual Glyph  GetGlyph (int unicode)
  Looks up a glyph by Unicode value. More...
 
virtual Glyph  GetGlyphByCode (int charCode)
  Looks up a glyph by its format-specific code. More...
 
virtual int  GetKerning (int first, int second)
  Gets the kerning between two glyphs. More...
 
override String  ToString ()
 

Additional Inherited Members

- Static Public Member Functions inherited from iText.IO.Font.TrueTypeFont
static byte[]  Merge (IDictionary< iText.IO.Font.TrueTypeFont, ICollection< int >> toMerge, String fontName)
  Merges the passed font into one. More...
 
static byte[]  Merge (IDictionary< iText.IO.Font.TrueTypeFont, ICollection< int >> toMerge, String fontName, bool isCmapCheckRequired)
  Merges the passed font into one. More...
 
- Static Public Member Functions inherited from iText.IO.Font.FontProgram
static float  ConvertTextSpaceToGlyphSpace (float value)
  Converts a PDF text-space value to normalized glyph space. More...
 
static float  ConvertGlyphSpaceToTextSpace (float value)
  Converts a normalized glyph-space value to PDF text space. More...
 
static double  ConvertGlyphSpaceToTextSpace (double value)
  Converts a normalized glyph-space value to PDF text space without losing double precision. More...
 
static int  ConvertGlyphSpaceToTextSpace (int value)
  Converts an integral normalized glyph-space value to PDF text space. More...
 
- Static Public Attributes inherited from iText.IO.Font.FontProgram
const int  HORIZONTAL_SCALING_FACTOR = 100
 
const int  DEFAULT_WIDTH = 1000
 
const int  UNITS_NORMALIZATION = 1000
 
- Package Functions inherited from iText.IO.Font.TrueTypeFont
  TrueTypeFont ()
  Creates an uninitialized font. More...
 
virtual void  ReadGdefTable ()
  Reads the GDEF table. More...
 
virtual void  ReadGsubTable ()
  Creates the GSUB table reader when the font supplies a GSUB table. More...
 
virtual void  ReadGposTable ()
  Creates the GPOS table reader. More...
 
- Package Functions inherited from iText.IO.Font.FontProgram
virtual void  SetRegistry (String registry)
  Sets the CID registry associated with this font program. More...
 
virtual void  SetTypoAscender (int ascender)
  Sets typo ascender. More...
 
virtual void  SetTypoDescender (int descender)
  Sets typo descender. More...
 
virtual void  SetCapHeight (int capHeight)
  Sets the capital letters height. More...
 
virtual void  SetXHeight (int xHeight)
  Sets the x-height in source font units. More...
 
virtual void  SetItalicAngle (int italicAngle)
  Sets the PostScript italic angle. More...
 
virtual void  SetStemV (int stemV)
  Sets the dominant vertical stem width. More...
 
virtual void  SetStemH (int stemH)
  Sets the dominant horizontal stem width. More...
 
virtual void  SetFontWeight (int fontWeight)
  Sets font weight. More...
 
virtual void  SetFontStretch (String fontWidth)
  Sets font width in css notation (font-stretch property) More...
 
virtual void  SetFixedPitch (bool isFixedPitch)
  Sets whether the font declares a fixed width. More...
 
virtual void  SetBold (bool isBold)
 
virtual void  SetBbox (int[] bbox)
  Sets the normalized font bounding box from a four-element coordinate array. More...
 
virtual void  SetFontFamily (String fontFamily)
  Sets a preferred font family name. More...
 
virtual void  SetFontName (String fontName)
  Sets the PostScript name of the font. More...
 
virtual void  FixSpaceIssue ()
  Ensures that an existing Unicode space glyph is also addressable through its font code. More...
 
- Package Attributes inherited from iText.IO.Font.TrueTypeFont
int[][]  bBoxes
  Per-glyph bounding boxes indexed by glyph ID, in normalized glyph units. More...
 
bool  isVertical
  Indicates that the selected CMap uses vertical writing metrics. More...
 
IntHashtable  kerning = new IntHashtable()
  The map containing the kerning information. More...
 
- Package Attributes inherited from iText.IO.Font.FontProgram
IDictionary< int, Glyph >  codeToGlyph = new DictionaryGlyph>()
 
IDictionary< int, Glyph >  unicodeToGlyph = new DictionaryGlyph>()
 
bool  isFontSpecific
  Indicates that character codes are interpreted using the font's built-in encoding rather than a Unicode-oriented encoding. More...
 
FontNames  fontNames
  Naming data extracted from the font program. More...
 
FontMetrics  fontMetrics = new FontMetrics()
  Metrics extracted from the font program. More...
 
FontIdentification  fontIdentification = new FontIdentification()
 
int  avgWidth
  Average glyph width in normalized glyph units. More...
 
String  encodingScheme = FontEncoding.FONT_SPECIFIC
  The font's encoding name. More...
 
String  registry
  CID registry name associated with this font, or null for fonts without a CID registry. More...
 

Member Function Documentation

◆ IsBuiltWith()

override bool iText.Kernel.Font.DocTrueTypeFont.IsBuiltWith ( String  fontName )
inlinevirtual

Returns false, because we cannot rely on an actual font subset and font name.

Parameters
fontName a font name or path to a font program
Returns
return false.

Reimplemented from iText.IO.Font.TrueTypeFont.