public class Font
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
int |
base |
int |
firstChar |
int |
glyphCount |
byte[] |
glyphs |
int |
glyphWidth |
int |
height |
static int |
SIZE_LARGE |
static int |
SIZE_MEDIUM |
static int |
SIZE_SMALL |
int |
width |
Modifier | Constructor and Description |
---|---|
protected |
Font(byte[] glyphs,
int width,
int height,
int base,
int glyphWidth,
int count,
int first)
Create a new font for the specified NXT format glyph map
|
Modifier and Type | Method and Description |
---|---|
int |
getBaselinePosition()
Return the base line position in pixels.
|
static Font |
getDefaultFont()
Return the system font.
|
static Font |
getFont(int face,
int style,
int size)
Request a particular type and size of font.
|
int |
getHeight()
return the height of the font in pixels.
|
static Font |
getLargeFont()
Return the large font.
|
static Font |
getSmallFont()
Return the small font.
|
int |
stringWidth(java.lang.String str)
Return the width of the specified string in pixels
|
public final int width
public final int height
public final int glyphWidth
public final int glyphCount
public final int firstChar
public final int base
public final byte[] glyphs
public static final int SIZE_SMALL
public static final int SIZE_MEDIUM
public static final int SIZE_LARGE
protected Font(byte[] glyphs, int width, int height, int base, int glyphWidth, int count, int first)
glyphs
- the actual bytes of the glyph.width
- The cell width.height
- The cell height.glyphWidth
- The width of the glyph bits.public static Font getDefaultFont()
public int getHeight()
public int getBaselinePosition()
public int stringWidth(java.lang.String str)
str
- public static Font getFont(int face, int style, int size)
face
- style
- size
- public static Font getSmallFont()
public static Font getLargeFont()