Table of Contents

Class Glyph

Namespace
iText.IO.Font.Otf
Assembly
itext.io.dll
public class Glyph
Inheritance
Glyph
Inherited Members

Constructors

Glyph(int, int)

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

public Glyph(int width, int unicode)

Parameters

width int

normalized width of the glyph

unicode int

utf-32 representation of glyph if appears. Correct value is > -1

Glyph(int, int, char[])

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

public Glyph(int code, int width, char[] chars)

Parameters

code int

code representation of the glyph in the font file

width int

normalized width of the glyph

chars char[]

The Unicode text represented by this Glyph.

Glyph(int, int, int)

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

public Glyph(int code, int width, int unicode)

Parameters

code int

code representation of the glyph in the font file

width int

normalized width of the glyph

unicode int

utf-32 representation of glyph if appears. Correct value is > -1

Glyph(int, int, int, char[], bool)

Construct a glyph object form the passed arguments.

public Glyph(int code, int width, int unicode, char[] chars, bool IsMark)

Parameters

code int

code representation of the glyph in the font file

width int

normalized width of the glyph

unicode int

utf-32 representation of glyph if appears. Correct value is > -1

chars char[]

The Unicode text represented by this Glyph. if null is passed, the unicode value is used to retrieve the chars.

IsMark bool

True if the glyph is a Mark

Glyph(int, int, int, int[])

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

public Glyph(int code, int width, int unicode, int[] bbox)

Parameters

code int

code representation of the glyph in the font file

width int

normalized width of the glyph

unicode int

utf-32 representation of glyph if appears. Correct value is > -1

bbox int[]

The normalized bounding box of this Glyph.

Glyph(Glyph)

Copy a Glyph.

public Glyph(Glyph glyph)

Parameters

glyph Glyph

Glyph to copy

Glyph(Glyph, int)

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

public Glyph(Glyph glyph, int unicode)

Parameters

glyph Glyph

glyph to copy

unicode int

new unicode point

Glyph(Glyph, int, int, int, int, int)

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

public Glyph(Glyph glyph, int xPlacement, int yPlacement, int xAdvance, int yAdvance, int anchorDelta)

Parameters

glyph Glyph

Glyph to copy

xPlacement int

x - placement offset

yPlacement int

y - placement offset

xAdvance int

x - advance offset

yAdvance int

y - advance offset

anchorDelta int

Index delta to base glyph. If after a glyph there are several anchored glyphs we should know we to find base glyph.

Methods

Equals(object)

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

public override bool Equals(object obj)

Parameters

obj object

The object

Returns

bool

True if this equals obj cast to Glyph, false otherwise.

GetAnchorDelta()

public virtual short GetAnchorDelta()

Returns

short

GetBbox()

public virtual int[] GetBbox()

Returns

int[]

GetChars()

public virtual char[] GetChars()

Returns

char[]

GetCode()

public virtual int GetCode()

Returns

int

GetHashCode()

public override int GetHashCode()

Returns

int

GetUnicode()

public virtual int GetUnicode()

Returns

int

GetUnicodeChars()

Gets Unicode char sequence corresponding to this glyph.

public virtual char[] GetUnicodeChars()

Returns

char[]

the Unicode char sequence that corresponds to this glyph

Remarks

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.

GetUnicodeString()

Gets a Unicode string corresponding to this glyph.

public virtual string GetUnicodeString()

Returns

string

the Unicode string that corresponds to this glyph

Remarks

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.

GetWidth()

public virtual int GetWidth()

Returns

int

GetXAdvance()

public virtual short GetXAdvance()

Returns

short

GetXPlacement()

public virtual short GetXPlacement()

Returns

short

GetYAdvance()

public virtual short GetYAdvance()

Returns

short

GetYPlacement()

public virtual short GetYPlacement()

Returns

short

HasAdvance()

public virtual bool HasAdvance()

Returns

bool

HasOffsets()

public virtual bool HasOffsets()

Returns

bool

HasPlacement()

public virtual bool HasPlacement()

Returns

bool

HasValidUnicode()

public virtual bool HasValidUnicode()

Returns

bool

IsMark()

public virtual bool IsMark()

Returns

bool

SetAnchorDelta(short)

public virtual void SetAnchorDelta(short anchorDelta)

Parameters

anchorDelta short

SetChars(char[])

public virtual void SetChars(char[] chars)

Parameters

chars char[]

SetUnicode(int)

public virtual void SetUnicode(int unicode)

Parameters

unicode int

SetXAdvance(short)

public virtual void SetXAdvance(short xAdvance)

Parameters

xAdvance short

SetXPlacement(short)

public virtual void SetXPlacement(short xPlacement)

Parameters

xPlacement short

SetYAdvance(short)

public virtual void SetYAdvance(short yAdvance)

Parameters

yAdvance short

SetYPlacement(short)

public virtual void SetYPlacement(short yPlacement)

Parameters

yPlacement short

ToString()

public override string ToString()

Returns

string