iText 8.0.2 API
iText.IO.Font.CFFFontSubset Class Reference

This Class subsets a CFF Type Font. More...

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

Public Member Functions

  CFFFontSubset (byte[] cff, ICollection< int > GlyphsUsed)
 
virtual byte[]  Process (String fontName)
  The Process function extracts one font out of the CFF file and returns a subset version of the original. More...
 
virtual byte[]  Process ()
  The Process function extracts one font out of the CFF file and returns a subset version of the original with the first name. More...
 
- Public Member Functions inherited from iText.IO.Font.CFFFont
virtual String  GetString (char sid)
 
virtual byte[]  GetCID (String fontName)
  get a single CID font. More...
 
virtual bool  IsCID ()
 
virtual bool  IsCID (String fontName)
 
virtual bool  Exists (String fontName)
 
virtual String[]  GetNames ()
 
  CFFFont (byte[] cff)
 

Detailed Description

This Class subsets a CFF Type Font.

This Class subsets a CFF Type Font. The subset is preformed for CID fonts and NON CID fonts. The Charstring is subsetted for both types. For CID fonts only the FDArray which are used are embedded. The Lsubroutines of the FDArrays used are subsetted as well. The Subroutine subset supports both Type1 and Type2 formatting although only tested on Type2 Format. For Non CID the Lsubroutines are subsetted. On both types the Gsubroutines is subsetted. A font which was not of CID type is transformed into CID as a part of the subset process. The CID synthetic creation was written by Sivan Toledo (sivan.nosp@m.@mat.nosp@m.h.tau.nosp@m..ac..nosp@m.il)

Member Function Documentation

◆ Process() [1/2]

virtual byte [] iText.IO.Font.CFFFontSubset.Process ( )
inlinevirtual

The Process function extracts one font out of the CFF file and returns a subset version of the original with the first name.

Returns
The new font stream

◆ Process() [2/2]

virtual byte [] iText.IO.Font.CFFFontSubset.Process ( String  fontName )
inlinevirtual

The Process function extracts one font out of the CFF file and returns a subset version of the original.

Parameters
fontName - The name of the font to be taken out of the CFF
Returns
The new font stream