public class Font extends java.lang.Object implements IFont
| Modifier and Type | Field and Description |
|---|---|
protected static int |
LETTER_TEXTURE_PADDING |
protected android.graphics.Canvas |
mCanvas |
protected android.graphics.Paint.FontMetrics |
mFontMetrics |
protected android.graphics.Paint |
mPaint |
protected android.graphics.Rect |
mTextBounds |
protected float[] |
mTextWidthContainer |
| Constructor and Description |
|---|
Font(FontManager pFontManager,
ITexture pTexture,
android.graphics.Typeface pTypeface,
float pSize,
boolean pAntiAlias,
Color pColor) |
Font(FontManager pFontManager,
ITexture pTexture,
android.graphics.Typeface pTypeface,
float pSize,
boolean pAntiAlias,
int pColorARGBPackedInt) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
drawLetter(java.lang.String pCharacterAsString,
float pLeft,
float pTop) |
float |
getAscent() |
float |
getDescent() |
float |
getLeading() |
Letter |
getLetter(char pCharacter) |
protected android.graphics.Bitmap |
getLetterBitmap(Letter pLetter) |
float |
getLineHeight() |
ITexture |
getTexture() |
void |
invalidateLetters() |
void |
load() |
void |
prepareLetters(char... pCharacters) |
void |
unload() |
void |
update(GLState pGLState) |
protected void |
updateTextBounds(java.lang.String pCharacterAsString) |
protected static final int LETTER_TEXTURE_PADDING
protected final android.graphics.Paint mPaint
protected final android.graphics.Paint.FontMetrics mFontMetrics
protected final android.graphics.Canvas mCanvas
protected final android.graphics.Rect mTextBounds
protected final float[] mTextWidthContainer
public Font(FontManager pFontManager, ITexture pTexture, android.graphics.Typeface pTypeface, float pSize, boolean pAntiAlias, Color pColor)
public Font(FontManager pFontManager, ITexture pTexture, android.graphics.Typeface pTypeface, float pSize, boolean pAntiAlias, int pColorARGBPackedInt)
public float getLeading()
public float getAscent()
public float getDescent()
public ITexture getTexture()
getTexture in interface IFontpublic float getLineHeight()
getLineHeight in interface IFontpublic Letter getLetter(char pCharacter) throws FontException
getLetter in interface IFontFontExceptionpublic void invalidateLetters()
protected android.graphics.Bitmap getLetterBitmap(Letter pLetter) throws FontException
FontExceptionprotected void drawLetter(java.lang.String pCharacterAsString,
float pLeft,
float pTop)
public void prepareLetters(char... pCharacters)
throws FontException
FontExceptionprotected void updateTextBounds(java.lang.String pCharacterAsString)
public void update(GLState pGLState)