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

Inherited by iText.Kernel.Font.DocFontEncoding.

Public Member Functions

virtual String  GetBaseEncoding ()
 
virtual bool  IsFontSpecific ()
 
virtual bool  AddSymbol (int code, int unicode)
 
virtual int  GetUnicode (int index)
  Gets unicode value for corresponding font's char code. More...
 
virtual int  GetUnicodeDifference (int index)
 
virtual bool  HasDifferences ()
 
virtual String  GetDifference (int index)
 
virtual void  SetDifference (int index, String difference)
  Sets a new value in the differences array. More...
 
virtual byte[]  ConvertToBytes (String text)
  Converts a String to a byte array according to the encoding. More...
 
virtual int  ConvertToByte (int unicode)
  Converts a unicode symbol or font specific code to byte according to the encoding. More...
 
virtual bool  CanEncode (int unicode)
  Check whether a unicode symbol or font specific code can be converted to byte according to the encoding. More...
 
virtual bool  CanDecode (int code)
  Check whether a byte code can be converted to unicode symbol according to the encoding. More...
 
virtual bool  IsBuiltWith (String encoding)
  Checks whether the FontEncoding was built with corresponding encoding. More...
 

Static Public Member Functions

static iText.IO.Font.FontEncoding  CreateFontEncoding (String baseEncoding)
 
static iText.IO.Font.FontEncoding  CreateEmptyFontEncoding ()
 
static iText.IO.Font.FontEncoding  CreateFontSpecificEncoding ()
  This encoding will base on font encoding (FontSpecific encoding in Type 1 terminology) More...
 

Static Public Attributes

const String  FONT_SPECIFIC = "FontSpecific"
 
const String  NOTDEF = ".notdef"
  A not defined character in a custom PDF encoding. More...
 

Member Function Documentation

◆ CanDecode()

virtual bool iText.IO.Font.FontEncoding.CanDecode ( int  code )
inlinevirtual

Check whether a byte code can be converted to unicode symbol according to the encoding.

Parameters
code a byte code to be checked.
Returns

true if code could be decoded.

◆ CanEncode()

virtual bool iText.IO.Font.FontEncoding.CanEncode ( int  unicode )
inlinevirtual

Check whether a unicode symbol or font specific code can be converted to byte according to the encoding.

Parameters
unicode a unicode symbol or font specific code to be checked.
Returns

true if ch could be encoded.

◆ ConvertToByte()

virtual int iText.IO.Font.FontEncoding.ConvertToByte ( int  unicode )
inlinevirtual

Converts a unicode symbol or font specific code to byte according to the encoding.

Parameters
unicode a unicode symbol or FontSpecif code to be converted.
Returns
a byte representing the conversion according to the encoding

◆ ConvertToBytes()

virtual byte [] iText.IO.Font.FontEncoding.ConvertToBytes ( String  text )
inlinevirtual

Converts a String to a byte array according to the encoding.

Converts a String to a byte array according to the encoding. String could contain a unicode symbols or font specific codes.

Parameters
text the String to be converted.
Returns
an array of byte representing the conversion according to the encoding

◆ CreateFontSpecificEncoding()

static iText.IO.Font.FontEncoding iText.IO.Font.FontEncoding.CreateFontSpecificEncoding ( )
inlinestatic

This encoding will base on font encoding (FontSpecific encoding in Type 1 terminology)

Returns
created font specific encoding

◆ GetUnicode()

virtual int iText.IO.Font.FontEncoding.GetUnicode ( int  index )
inlinevirtual

Gets unicode value for corresponding font's char code.

Parameters
index font's char code
Returns
-1, if the char code unsupported or valid unicode.

◆ IsBuiltWith()

virtual bool iText.IO.Font.FontEncoding.IsBuiltWith ( String  encoding )
inlinevirtual

Checks whether the FontEncoding was built with corresponding encoding.

Parameters
encoding an encoding
Returns
true, if the FontEncoding was built with the encoding. Otherwise false.

◆ SetDifference()

virtual void iText.IO.Font.FontEncoding.SetDifference ( int  index,
String  difference 
)
inlinevirtual

Sets a new value in the differences array.

Sets a new value in the differences array. See differences.

Parameters
index position to replace
difference new difference value

Member Data Documentation

◆ NOTDEF

const String iText.IO.Font.FontEncoding.NOTDEF = ".notdef"
static

A not defined character in a custom PDF encoding.