iText 8.0.5 API
iText.IO.Font.Otf.Glyph Class Reference

Public Member Functions

  Glyph (int code, int width, int unicode)
  Construct a non-mark Glyph, retrieving characters from unicode. More...
 
  Glyph (int code, int width, char[] chars)
  Construct a non-mark Glyph, using the codepoint of the characters as unicode point. More...
 
  Glyph (int code, int width, int unicode, int[] bbox)
  Construct a non-mark Glyph, retrieving characters from unicode. More...
 
  Glyph (int width, int unicode)
  Construct a non-mark Glyph object with id -1 and characters retrieved from unicode. More...
 
  Glyph (int code, int width, int unicode, char[] chars, bool IsMark)
  Construct a glyph object form the passed arguments. More...
 
  Glyph (iText.IO.Font.Otf.Glyph glyph)
  Copy a Glyph. More...
 
  Glyph (iText.IO.Font.Otf.Glyph glyph, int xPlacement, int yPlacement, int xAdvance, int yAdvance, int anchorDelta)
  Copy a Glyph and assign new placement and advance offsets and a new index delta to base glyph More...
 
  Glyph (iText.IO.Font.Otf.Glyph glyph, int unicode)
  Copy a glyph and assign the copied glyph a new unicode point and characters More...
 
virtual int  GetCode ()
 
virtual int  GetWidth ()
 
virtual int[]  GetBbox ()
 
virtual bool  HasValidUnicode ()
 
virtual int  GetUnicode ()
 
virtual void  SetUnicode (int unicode)
 
virtual char[]  GetChars ()
 
virtual void  SetChars (char[] chars)
 
virtual bool  IsMark ()
 
virtual short  GetXPlacement ()
 
virtual void  SetXPlacement (short xPlacement)
 
virtual short  GetYPlacement ()
 
virtual void  SetYPlacement (short yPlacement)
 
virtual short  GetXAdvance ()
 
virtual void  SetXAdvance (short xAdvance)
 
virtual short  GetYAdvance ()
 
virtual void  SetYAdvance (short yAdvance)
 
virtual short  GetAnchorDelta ()
 
virtual void  SetAnchorDelta (short anchorDelta)
 
virtual bool  HasOffsets ()
 
virtual bool  HasPlacement ()
 
virtual bool  HasAdvance ()
 
override int  GetHashCode ()
 
override bool  Equals (Object obj)
  Two Glyphs are equal if their unicode characters, code and normalized width are equal. More...
 
virtual String  GetUnicodeString ()
  Gets a Unicode string corresponding to this glyph. More...
 
virtual char[]  GetUnicodeChars ()
  Gets Unicode char sequence corresponding to this glyph. More...
 
override String  ToString ()
 

Constructor & Destructor Documentation

◆ Glyph() [1/8]

iText.IO.Font.Otf.Glyph.Glyph ( int  code,
int  width,
int  unicode 
)
inline

Construct a non-mark Glyph, retrieving characters from unicode.

Parameters
code code representation of the glyph in the font file
width normalized width of the glyph
unicode utf-32 representation of glyph if appears. Correct value is > -1

◆ Glyph() [2/8]

iText.IO.Font.Otf.Glyph.Glyph ( int  code,
int  width,
char[]  chars 
)
inline

Construct a non-mark Glyph, using the codepoint of the characters as unicode point.

Parameters
code code representation of the glyph in the font file
width normalized width of the glyph
chars The Unicode text represented by this Glyph.

◆ Glyph() [3/8]

iText.IO.Font.Otf.Glyph.Glyph ( int  code,
int  width,
int  unicode,
int[]  bbox 
)
inline

Construct a non-mark Glyph, retrieving characters from unicode.

Parameters
code code representation of the glyph in the font file
width normalized width of the glyph
unicode utf-32 representation of glyph if appears. Correct value is > -1
bbox The normalized bounding box of this Glyph.

◆ Glyph() [4/8]

iText.IO.Font.Otf.Glyph.Glyph ( int  width,
int  unicode 
)
inline

Construct a non-mark Glyph object with id -1 and characters retrieved from unicode.

Parameters
width normalized width of the glyph
unicode utf-32 representation of glyph if appears. Correct value is > -1

◆ Glyph() [5/8]

iText.IO.Font.Otf.Glyph.Glyph ( int  code,
int  width,
int  unicode,
char[]  chars,
bool  IsMark 
)
inline

Construct a glyph object form the passed arguments.

Parameters
code code representation of the glyph in the font file
width normalized width of the glyph
unicode utf-32 representation of glyph if appears. Correct value is > -1
chars The Unicode text represented by this Glyph. if null is passed, the unicode value is used to retrieve the chars.
IsMark True if the glyph is a Mark

◆ Glyph() [6/8]

iText.IO.Font.Otf.Glyph.Glyph ( iText.IO.Font.Otf.Glyph  glyph )
inline

Copy a Glyph.

Parameters
glyph Glyph to copy

◆ Glyph() [7/8]

iText.IO.Font.Otf.Glyph.Glyph ( iText.IO.Font.Otf.Glyph  glyph,
int  xPlacement,
int  yPlacement,
int  xAdvance,
int  yAdvance,
int  anchorDelta 
)
inline

Copy a Glyph and assign new placement and advance offsets and a new index delta to base glyph

Parameters
glyph Glyph to copy
xPlacement x - placement offset
yPlacement y - placement offset
xAdvance x - advance offset
yAdvance y - advance offset
anchorDelta Index delta to base glyph. If after a glyph there are several anchored glyphs we should know we to find base glyph.

◆ Glyph() [8/8]

iText.IO.Font.Otf.Glyph.Glyph ( iText.IO.Font.Otf.Glyph  glyph,
int  unicode 
)
inline

Copy a glyph and assign the copied glyph a new unicode point and characters

Parameters
glyph glyph to copy
unicode new unicode point

Member Function Documentation

◆ Equals()

override bool iText.IO.Font.Otf.Glyph.Equals ( Object  obj )
inline

Two Glyphs are equal if their unicode characters, code and normalized width are equal.

Parameters
obj The object
Returns
True if this equals obj cast to Glyph, false otherwise.

◆ GetUnicodeChars()

virtual char [] iText.IO.Font.Otf.Glyph.GetUnicodeChars ( )
inlinevirtual

Gets Unicode char sequence corresponding to this glyph.

Gets Unicode char sequence corresponding to this glyph. In general case it might consist of many characters. If this glyph does not have a valid unicode ( HasValidUnicode() ), then a special Unicode '\ufffd' character is returned.

Returns
the Unicode char sequence that corresponds to this glyph

◆ GetUnicodeString()

virtual String iText.IO.Font.Otf.Glyph.GetUnicodeString ( )
inlinevirtual

Gets a Unicode string corresponding to this glyph.

Gets a Unicode string corresponding to this glyph. In general case it might consist of many characters. If this glyph does not have a valid unicode ( HasValidUnicode() ), then a string consisting of a special Unicode '\ufffd' character is returned.

Returns
the Unicode string that corresponds to this glyph