Constructor and Description |
---|
NamedGlyphBox(FontMetrics fm,
int size,
java.lang.String name,
int codepoint)
Construct a glyph box:
|
Modifier and Type | Method and Description |
---|---|
java.lang.StringBuffer |
genPostScript(PostScriptContext context)
Generate PostScript text that generates the glyph.
|
int |
getChar()
Return the Unicode codepoint
|
int |
getDepth()
Return the depth of the glyph in units (1/1000 points).
|
FontMetrics |
getFont()
Return its font
|
int |
getFontSize()
Return its font size
|
int |
getHeight()
Return the height of the glyph in units (1/1000 points).
|
java.lang.String |
getName()
Return the character name.
|
int |
getWidth()
Returns the width of the glyph in units (1/1000 points).
|
java.lang.String |
toString()
Return a printable string representing the internal state.
|
getHyphen, getPenalty, getPenaltyFlag, getShrinkability, getStretchability, isBox, isGlue, isKerning, isPenalty, shrink, stretch
public NamedGlyphBox(FontMetrics fm, int size, java.lang.String name, int codepoint)
fm
- The metrics of the selected font.size
- The font size in points (not units!).name
- The name of the glyph.public int getWidth()
public int getHeight()
public int getDepth()
public java.lang.String getName()
public int getChar()
public FontMetrics getFont()
public int getFontSize()
getFontSize
in interface Item
getFontSize
in class Box
public java.lang.StringBuffer genPostScript(PostScriptContext context)
genPostScript
in interface Item
genPostScript
in class Box
context
- The context is used to combine multiple
subsequent characters to PostScript strings
as far as possible.public java.lang.String toString()
toString
in class java.lang.Object