public class Glyph extends Object implements Serializable
Constructor and Description |
---|
Glyph(Glyph glyph)
Copy a Glyph.
|
Glyph(Glyph glyph, int unicode)
Copy a glyph and assign the copied glyph a new unicode point and characters
|
Glyph(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
|
Glyph(int width, int unicode)
Construct a non-mark Glyph object with id -1 and characters retrieved from unicode.
|
Glyph(int code, int width, char[] chars)
Construct a non-mark Glyph, using the codepoint of the characters as unicode point.
|
Glyph(int code, int width, int unicode)
Construct a non-mark Glyph, retrieving characters from unicode.
|
Glyph(int code, int width, int unicode, char[] chars, boolean IsMark)
Construct a glyph object form the passed arguments.
|
Glyph(int code, int width, int unicode, int[] bbox)
Construct a non-mark Glyph, retrieving characters from unicode.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Two Glyphs are equal if their unicode characters, code and normalized width are equal.
|
short |
getAnchorDelta() |
int[] |
getBbox() |
char[] |
getChars() |
int |
getCode() |
int |
getUnicode() |
char[] |
getUnicodeChars()
Gets Unicode char sequence corresponding to this glyph.
|
String |
getUnicodeString()
Gets a Unicode string corresponding to this glyph.
|
int |
getWidth() |
short |
getXAdvance() |
short |
getXPlacement() |
short |
getYAdvance() |
short |
getYPlacement() |
boolean |
hasAdvance() |
int |
hashCode() |
boolean |
hasOffsets() |
boolean |
hasPlacement() |
boolean |
hasValidUnicode() |
boolean |
isMark() |
void |
setAnchorDelta(short anchorDelta) |
void |
setChars(char[] chars) |
void |
setUnicode(int unicode) |
void |
setXAdvance(short xAdvance) |
void |
setXPlacement(short xPlacement) |
void |
setYAdvance(short yAdvance) |
void |
setYPlacement(short yPlacement) |
String |
toString() |
public Glyph(int code, int width, int unicode)
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
public Glyph(int code, int width, char[] chars)
code
- code representation of the glyph in the font file
width
- normalized width of the glyph
chars
- The Unicode text represented by this Glyph.
public Glyph(int code, int width, int unicode, int[] bbox)
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.
public Glyph(int width, int unicode)
width
- normalized width of the glyph
unicode
- utf-32 representation of glyph if appears. Correct value is > -1
public Glyph(int code, int width, int unicode, char[] chars, boolean IsMark)
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
public Glyph(Glyph glyph)
glyph
- Glyph to copy
public Glyph(Glyph glyph, int xPlacement, int yPlacement, int xAdvance, int yAdvance, int anchorDelta)
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.
public Glyph(Glyph glyph, int unicode)
glyph
- glyph to copy
unicode
- new unicode point
public int getCode()
public int getWidth()
public int[] getBbox()
public boolean hasValidUnicode()
public int getUnicode()
public void setUnicode(int unicode)
public char[] getChars()
public void setChars(char[] chars)
public boolean isMark()
public short getXPlacement()
public void setXPlacement(short xPlacement)
public short getYPlacement()
public void setYPlacement(short yPlacement)
public short getXAdvance()
public void setXAdvance(short xAdvance)
public short getYAdvance()
public void setYAdvance(short yAdvance)
public short getAnchorDelta()
public void setAnchorDelta(short anchorDelta)
public boolean hasOffsets()
public boolean hasPlacement()
public boolean hasAdvance()
public boolean equals(Object obj)
public String getUnicodeString()
hasValidUnicode()
), then a string consisting of a special Unicode '�' character is returned.
public char[] getUnicodeChars()
hasValidUnicode()
), then a special Unicode '�' character is returned.
Copyright © 1998–2018 iText Group NV. All rights reserved.