| Modifier and Type | Class and Description |
|---|---|
| public static enum |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| pack-priv BitmapFont | |
| private BitmapFontCache | |
| private int | |
| private final List | |
| private Font | |
| private float | |
| private FreeTypeFontGenerator | |
| private int | |
| private final List | |
| private int | |
| private final Glyph[][] | |
| private static final Comparator | heightComparator
Sorts glyphs by height, tallest first. |
| private GlyphLayout | |
| private int | |
| private static final int | |
| private FontMetrics | |
| private Glyph | |
| private boolean | |
| private int | |
| private int | |
| private int | |
| private int | |
| private int | |
| private int | |
| private static final int | |
| private static final int | |
| private final List | |
| pack-priv UnicodeFont. | |
| private int | |
| private String | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| public | UnicodeFont(String
The file system or classpath location of the TrueTypeFont file. ttfFileRef, String The file system or classpath location of the Hiero settings file. hieroFileRef)
|
| public | UnicodeFont(String
The file system or classpath location of the TrueTypeFont file. ttfFileRef, HieroSettings settings)
|
| public | UnicodeFont(String
The file system or classpath location of the TrueTypeFont file. ttfFileRef, int size, boolean bold, boolean italic)
|
| public | UnicodeFont(Font font, String
The file system or classpath location of the Hiero settings file. hieroFileRef)Creates a new UnicodeFont. |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addAsciiGlyphs()
Queues the glyphs in the ASCII character set (codepoints 32 through 255) to be loaded. |
| public void | addGlyphs(int startCodePoint, int endCodePoint)
Queues the glyphs in the specified codepoint range (inclusive) to be loaded. |
| public void | |
| public void | addNeheGlyphs()
Queues the glyphs in the NEHE character set (codepoints 32 through 128) to be loaded. |
| private static Font | |
| public void | |
| private void | |
| public void | |
| public void | |
| public void | |
| private void | |
| public int | |
| public int | getDescent()
Gets the distance from the baseline to the bottom of most alphanumeric characters with descenders. |
| public List | |
| public Font | |
| public String | |
| public float | |
| public Glyph | getGlyph(int glyphCode, int codePoint, Rectangle bounds, GlyphVector vector, int index)
Returns the glyph for the specified codePoint. |
| private Rectangle | |
| public int | |
| public List | |
| public int | |
| public int | |
| public int | getLeading()
Gets the extra distance between the descent of one line of text to the ascent of the next. |
| public int | |
| public boolean | |
| public int | |
| public int | |
| public int | getPaddingBottom()
Returns the padding below a glyph on the GlyphPage to allow for effects to be drawn. |
| public int | getPaddingLeft()
Returns the padding to the left of a glyph on the GlyphPage to allow for effects to be drawn. |
| public int | getPaddingRight()
Returns the padding to the right of a glyph on the GlyphPage to allow for effects to be drawn. |
| public int | |
| public UnicodeFont. | |
| public int | |
| public int | |
| public int | getYOffset(String text)
Returns the distance from the y drawing location to the top most pixel of the specified text. |
| private void | |
| public boolean | |
| public boolean | loadGlyphs(int maxGlyphsToLoad)
Loads up to the specified number of queued glyphs to the backing textures. |
| private void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setPaddingAdvanceY(int paddingAdvanceY)
Sets the additional amount to offset a line of text on the y axis. |
| public void | setPaddingBottom(int paddingBottom)
Sets the padding below a glyph on the GlyphPage to allow for effects to be drawn. |
| public void | setPaddingLeft(int paddingLeft)
Sets the padding to the left of a glyph on the GlyphPage to allow for effects to be drawn. |
| public void | setPaddingRight(int paddingRight)
Sets the padding to the right of a glyph on the GlyphPage to allow for effects to be drawn. |
| public void | setPaddingTop(int paddingTop)
Sets the padding above a glyph on the GlyphPage to allow for effects to be drawn. |
| public void |
| ascent | back to summary |
|---|---|
| private int ascent | |
| bitmapFont | back to summary |
|---|---|
| pack-priv BitmapFont bitmapFont | |
| cache | back to summary |
|---|---|
| private BitmapFontCache cache | |
| descent | back to summary |
|---|---|
| private int descent | |
| effects | back to summary |
|---|---|
| private final List<Effect> effects | |
| font | back to summary |
|---|---|
| private Font font | |
| gamma | back to summary |
|---|---|
| private float gamma | |
| generator | back to summary |
|---|---|
| private FreeTypeFontGenerator generator | |
| glyphPageHeight | back to summary |
|---|---|
| private int glyphPageHeight | |
| glyphPages | back to summary |
|---|---|
| private final List<GlyphPage> glyphPages | |
| glyphPageWidth | back to summary |
|---|---|
| private int glyphPageWidth | |
| glyphs | back to summary |
|---|---|
| private final Glyph[][] glyphs | |
| heightComparator | back to summary |
|---|---|
| private static final Comparator<T> heightComparator Sorts glyphs by height, tallest first. | |
| layout | back to summary |
|---|---|
| private GlyphLayout layout | |
| leading | back to summary |
|---|---|
| private int leading | |
| MAX_GLYPH_CODE | back to summary |
|---|---|
| private static final int MAX_GLYPH_CODE | |
| metrics | back to summary |
|---|---|
| private FontMetrics metrics | |
| missingGlyph | back to summary |
|---|---|
| private Glyph missingGlyph | |
| mono | back to summary |
|---|---|
| private boolean mono | |
| paddingAdvanceX | back to summary |
|---|---|
| private int paddingAdvanceX | |
| paddingAdvanceY | back to summary |
|---|---|
| private int paddingAdvanceY | |
| paddingBottom | back to summary |
|---|---|
| private int paddingBottom | |
| paddingLeft | back to summary |
|---|---|
| private int paddingLeft | |
| paddingRight | back to summary |
|---|---|
| private int paddingRight | |
| paddingTop | back to summary |
|---|---|
| private int paddingTop | |
| PAGE_SIZE | back to summary |
|---|---|
| private static final int PAGE_SIZE | |
| PAGES | back to summary |
|---|---|
| private static final int PAGES | |
| queuedGlyphs | back to summary |
|---|---|
| private final List<Glyph> queuedGlyphs | |
| renderType | back to summary |
|---|---|
| pack-priv UnicodeFont. | |
| spaceWidth | back to summary |
|---|---|
| private int spaceWidth | |
| ttfFileRef | back to summary |
|---|---|
| private String ttfFileRef | |
| U | back to summary |
|---|---|
| private static final int U | |
| U2 | back to summary |
|---|---|
| private static final int U2 | |
| V | back to summary |
|---|---|
| private static final int V | |
| V2 | back to summary |
|---|---|
| private static final int V2 | |
| X | back to summary |
|---|---|
| private static final int X | |
| X2 | back to summary |
|---|---|
| private static final int X2 | |
| Y | back to summary |
|---|---|
| private static final int Y | |
| Y2 | back to summary |
|---|---|
| private static final int Y2 | |
| UnicodeFont | back to summary |
|---|---|
| public UnicodeFont(String ttfFileRef, String hieroFileRef) | |
| UnicodeFont | back to summary |
|---|---|
public UnicodeFont(String ttfFileRef, HieroSettings settings)
| |
| UnicodeFont | back to summary |
|---|---|
public UnicodeFont(String ttfFileRef, int size, boolean bold, boolean italic)
| |
| UnicodeFont | back to summary |
|---|---|
| public UnicodeFont(Font font, String hieroFileRef) Creates a new UnicodeFont.
| |
| UnicodeFont | back to summary |
|---|---|
| public UnicodeFont(Font font, HieroSettings settings) Creates a new UnicodeFont. | |
| UnicodeFont | back to summary |
|---|---|
| public UnicodeFont(Font font) Creates a new UnicodeFont. | |
| UnicodeFont | back to summary |
|---|---|
| public UnicodeFont(Font font, int size, boolean bold, boolean italic) Creates a new UnicodeFont. | |
| addAsciiGlyphs | back to summary |
|---|---|
| public void addAsciiGlyphs() Queues the glyphs in the ASCII character set (codepoints 32 through 255) to be loaded. Note that the glyphs are not
actually loaded until | |
| addGlyphs | back to summary |
|---|---|
| public void addGlyphs(int startCodePoint, int endCodePoint) Queues the glyphs in the specified codepoint range (inclusive) to be loaded. Note that the glyphs are not actually loaded
until | |
| addGlyphs | back to summary |
|---|---|
| public void addGlyphs(String text) Queues the glyphs in the specified text to be loaded. Note that the glyphs are not actually loaded until
| |
| addNeheGlyphs | back to summary |
|---|---|
| public void addNeheGlyphs() Queues the glyphs in the NEHE character set (codepoints 32 through 128) to be loaded. Note that the glyphs are not actually
loaded until | |
| createFont | back to summary |
|---|---|
private static Font createFont(String ttfFileRef)
| |
| dispose | back to summary |
|---|---|
| public void dispose() Releases all resources used by this UnicodeFont. This method should be called when this UnicodeFont instance is no longer needed. | |
| drawBitmap | back to summary |
|---|---|
| private void drawBitmap(String text, int startIndex, int endIndex) | |
| drawString | back to summary |
|---|---|
| public void drawString(float x, float y, String text, Color color, int startIndex, int endIndex) | |
| drawString | back to summary |
|---|---|
| public void drawString(float x, float y, String text) | |
| drawString | back to summary |
|---|---|
| public void drawString(float x, float y, String text, Color col) | |
| drawUnicode | back to summary |
|---|---|
| private void drawUnicode(String text, int startIndex, int endIndex) | |
| getAscent | back to summary |
|---|---|
| public int getAscent() Gets the distance from the baseline to the y drawing location. | |
| getDescent | back to summary |
|---|---|
| public int getDescent() Gets the distance from the baseline to the bottom of most alphanumeric characters with descenders. | |
| getEffects | back to summary |
|---|---|
| public List Returns a list of | |
| getFont | back to summary |
|---|---|
| public Font getFont() Returns the TrueTypeFont for this UnicodeFont. | |
| getFontFile | back to summary |
|---|---|
| public String getFontFile() Returns the path to the TTF file for this UnicodeFont, or null. If this UnicodeFont was created without specifying the TTF file, it will try to determine the path using Sun classes. If this fails, null is returned. | |
| getGamma | back to summary |
|---|---|
| public float getGamma() | |
| getGlyph | back to summary |
|---|---|
| public Glyph getGlyph(int glyphCode, int codePoint, Rectangle bounds, GlyphVector vector, int index) Returns the glyph for the specified codePoint. If the glyph does not exist yet, it is created and queued to be loaded. | |
| getGlyphBounds | back to summary |
|---|---|
| private Rectangle getGlyphBounds(GlyphVector vector, int index, int codePoint) | |
| getGlyphPageHeight | back to summary |
|---|---|
| public int getGlyphPageHeight() Returns the height of the backing textures. | |
| getGlyphPages | back to summary |
|---|---|
| public List Returns the GlyphPages for this UnicodeFont. | |
| getGlyphPageWidth | back to summary |
|---|---|
| public int getGlyphPageWidth() Returns the width of the backing textures. | |
| getHeight | back to summary |
|---|---|
| public int getHeight(String text) | |
| getLeading | back to summary |
|---|---|
| public int getLeading() Gets the extra distance between the descent of one line of text to the ascent of the next. | |
| getLineHeight | back to summary |
|---|---|
| public int getLineHeight() Returns the distance from one line of text to the next. This is the sum of the descent, ascent, leading, padding top,
padding bottom, and padding advance y. To change the line height, use | |
| getMono | back to summary |
|---|---|
| public boolean getMono() | |
| getPaddingAdvanceX | back to summary |
|---|---|
| public int getPaddingAdvanceX() Gets the additional amount to offset glyphs on the x axis. | |
| getPaddingAdvanceY | back to summary |
|---|---|
| public int getPaddingAdvanceY() Gets the additional amount to offset a line of text on the y axis. | |
| getPaddingBottom | back to summary |
|---|---|
| public int getPaddingBottom() Returns the padding below a glyph on the GlyphPage to allow for effects to be drawn. | |
| getPaddingLeft | back to summary |
|---|---|
| public int getPaddingLeft() Returns the padding to the left of a glyph on the GlyphPage to allow for effects to be drawn. | |
| getPaddingRight | back to summary |
|---|---|
| public int getPaddingRight() Returns the padding to the right of a glyph on the GlyphPage to allow for effects to be drawn. | |
| getPaddingTop | back to summary |
|---|---|
| public int getPaddingTop() Returns the padding above a glyph on the GlyphPage to allow for effects to be drawn. | |
| getRenderType | back to summary |
|---|---|
| public UnicodeFont. | |
| getSpaceWidth | back to summary |
|---|---|
| public int getSpaceWidth() | |
| getWidth | back to summary |
|---|---|
| public int getWidth(String text) | |
| getYOffset | back to summary |
|---|---|
| public int getYOffset(String text) Returns the distance from the y drawing location to the top most pixel of the specified text. | |
| initializeFont | back to summary |
|---|---|
| private void initializeFont(Font baseFont, int size, boolean bold, boolean italic) | |
| loadGlyphs | back to summary |
|---|---|
| public boolean loadGlyphs() Loads all queued glyphs to the backing textures. Glyphs that are typically displayed together should be added and loaded at the same time so that they are stored on the same backing texture. This reduces the number of backing texture binds required to draw glyphs. | |
| loadGlyphs | back to summary |
|---|---|
| public boolean loadGlyphs(int maxGlyphsToLoad) Loads up to the specified number of queued glyphs to the backing textures. This is typically called from the game loop to load glyphs on the fly that were requested for display but have not yet been loaded. | |
| loadSettings | back to summary |
|---|---|
| private void loadSettings(HieroSettings settings) | |
| setGamma | back to summary |
|---|---|
| public void setGamma(float gamma) | |
| setGlyphPageHeight | back to summary |
|---|---|
| public void setGlyphPageHeight(int glyphPageHeight) Sets the height of the backing textures. Default is 512. | |
| setGlyphPageWidth | back to summary |
|---|---|
| public void setGlyphPageWidth(int glyphPageWidth) Sets the width of the backing textures. Default is 512. | |
| setMono | back to summary |
|---|---|
| public void setMono(boolean mono) | |
| setPaddingAdvanceX | back to summary |
|---|---|
| public void setPaddingAdvanceX(int paddingAdvanceX) Sets the additional amount to offset glyphs on the x axis. This is typically set to a negative number when left or right padding is used so that glyphs are not spaced too far apart. | |
| setPaddingAdvanceY | back to summary |
|---|---|
| public void setPaddingAdvanceY(int paddingAdvanceY) Sets the additional amount to offset a line of text on the y axis. This is typically set to a negative number when top or bottom padding is used so that lines of text are not spaced too far apart. | |
| setPaddingBottom | back to summary |
|---|---|
| public void setPaddingBottom(int paddingBottom) Sets the padding below a glyph on the GlyphPage to allow for effects to be drawn. | |
| setPaddingLeft | back to summary |
|---|---|
| public void setPaddingLeft(int paddingLeft) Sets the padding to the left of a glyph on the GlyphPage to allow for effects to be drawn. | |
| setPaddingRight | back to summary |
|---|---|
| public void setPaddingRight(int paddingRight) Sets the padding to the right of a glyph on the GlyphPage to allow for effects to be drawn. | |
| setPaddingTop | back to summary |
|---|---|
| public void setPaddingTop(int paddingTop) Sets the padding above a glyph on the GlyphPage to allow for effects to be drawn. | |
| setRenderType | back to summary |
|---|---|
| public void setRenderType(UnicodeFont. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final UnicodeFont. | |
| public static final UnicodeFont. | |
| public static final UnicodeFont. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static UnicodeFont. | |
| public static UnicodeFont. |
| FreeType | back to summary |
|---|---|
| public static final UnicodeFont. | |
| Java | back to summary |
|---|---|
| public static final UnicodeFont. | |
| Native | back to summary |
|---|---|
| public static final UnicodeFont. | |
| RenderType | back to summary |
|---|---|
| private RenderType() | |
| valueOf | back to summary |
|---|---|
| public static UnicodeFont. | |
| values | back to summary |
|---|---|
| public static UnicodeFont. | |