iText 9.5.0 API
iText.IO.Font.CFFFont Class Reference

Class containing base Compact Font Format functionality More...

Inheritance diagram for iText.IO.Font.CFFFont:
iText.IO.Font.CFFFontSubset

Classes

class   DictNumberItem
  A dictionary number on the list. More...
 
class   DictOffsetItem
  An unknown offset in a dictionary for the list. More...
 
class   Font
  Represents font contained by the CFF font in a FontSet. More...
 
class   IndexBaseItem
 
class   IndexMarkerItem
 
class   IndexOffsetItem
  An index-offset item for the list. More...
 
class   Item
  List items for the linked list that builds the new CID font. More...
 
class   MarkerItem
  An offset-marker item for the list. More...
 
class   OffsetItem
  An offset item, representing a data object. More...
 
class   RangeItem
  A range item. More...
 
class   StringItem
  A String item More...
 
class   SubrMarkerItem
 
class   UInt16Item
  A SID or Card16 item. More...
 
class   UInt24Item
  Card24 item. More...
 
class   UInt32Item
  A Card32 item. More...
 
class   UInt8Item
  A Card8 item. More...
 

Public Member Functions

virtual String  GetString (char sid)
  Gets string from INDEX structure which corresponds to provided SID. More...
 
virtual byte[]  GetCID (String fontName)
  Gets a single CID font. More...
 
virtual bool  IsCID ()
  Determines whether the first font in FontSet is CID font. More...
 
virtual bool  IsCID (String fontName)
  Determines whether specified font is CID font. More...
 
virtual bool  Exists (String fontName)
  Checks for font existence in FontSet. More...
 
virtual String[]  GetNames ()
  Gets all font names from FontSet table. More...
 
  CFFFont (byte[] cff)
  Creates a new CFF font instance from CFF font data. More...
 

Package Functions

virtual void  GetDictItem ()
 
virtual CFFFont.RangeItem  GetEntireIndexRange (int indexOffset)
  A utility that creates a range item for an entire index More...
 

Package Attributes

String  key
 
Object[]  args = new Object[48]
 
int  arg_count = 0
 
RandomAccessFileOrArray  buf
  A random Access File or an array More...
 
int  nameIndexOffset
 
int  topdictIndexOffset
 
int  stringIndexOffset
 
int  gsubrIndexOffset
 
int[]  nameOffsets
 
int[]  topdictOffsets
 
int[]  stringOffsets
 
int[]  gsubrOffsets
 
CFFFont.Font[]  fonts
 

Detailed Description

Class containing base Compact Font Format functionality

Constructor & Destructor Documentation

◆ CFFFont()

iText.IO.Font.CFFFont.CFFFont ( byte[]  cff )
inline

Creates a new CFF font instance from CFF font data.

Parameters
cff cff font binary data

Member Function Documentation

◆ Exists()

virtual bool iText.IO.Font.CFFFont.Exists ( String  fontName )
inlinevirtual

Checks for font existence in FontSet.

Parameters
fontName font name to search for
Returns

true if font exists in FontSet, false otherwise

◆ GetCID()

virtual byte [] iText.IO.Font.CFFFont.GetCID ( String  fontName )
inlinevirtual

Gets a single CID font.

Gets a single CID font. The PDF architecture (1.4) supports 16-bit strings only with CID CFF fonts, not in Type-1 CFF fonts, so we convert the font to CID if it is in the Type-1 format. Two other tasks that we need to do are to select only a single font from the CFF package (this again is a PDF restriction) and to subset the CharStrings glyph description.

Parameters
fontName name of the font
Returns
byte array represents the CID font

◆ GetEntireIndexRange()

virtual CFFFont.RangeItem iText.IO.Font.CFFFont.GetEntireIndexRange ( int  indexOffset )
inlinepackagevirtual

A utility that creates a range item for an entire index

Parameters
indexOffset where the index is
Returns
a range item representing the entire index

◆ GetNames()

virtual String [] iText.IO.Font.CFFFont.GetNames ( )
inlinevirtual

Gets all font names from FontSet table.

Returns
font names contained by this CFF font

◆ GetString()

virtual String iText.IO.Font.CFFFont.GetString ( char  sid )
inlinevirtual

Gets string from INDEX structure which corresponds to provided SID.

Parameters
sid 2-byte string identifier
Returns
string value

◆ IsCID() [1/2]

virtual bool iText.IO.Font.CFFFont.IsCID ( )
inlinevirtual

Determines whether the first font in FontSet is CID font.

Returns

true if font is CID, false otherwise

◆ IsCID() [2/2]

virtual bool iText.IO.Font.CFFFont.IsCID ( String  fontName )
inlinevirtual

Determines whether specified font is CID font.

Parameters
fontName font name to check in fonts table
Returns

true if specified font is CID, false otherwise

Member Data Documentation

◆ buf

RandomAccessFileOrArray iText.IO.Font.CFFFont.buf
package

A random Access File or an array