Known Direct Subclasses
|
Class Overview
(c) 2010 Nicolas Gramlich
(c) 2011 Zynga Inc.
Summary
Public Constructors |
|
Font(FontManager pFontManager, ITexture pTexture, Typeface pTypeface, float pSize, boolean pAntiAlias, Color pColor)
|
|
Font(FontManager pFontManager, ITexture pTexture, Typeface pTypeface, float pSize, boolean pAntiAlias, int pColorARGBPackedInt)
|
Constants
protected
static
final
int
LETTER_TEXTURE_PADDING
Constant Value:
1
(0x00000001)
Fields
protected
final
Canvas
mCanvas
protected
final
Paint
mPaint
protected
final
Rect
mTextBounds
protected
final
float[]
mTextWidthContainer
Public Constructors
public
Font
(FontManager pFontManager, ITexture pTexture, Typeface pTypeface, float pSize, boolean pAntiAlias, int pColorARGBPackedInt)
Public Methods
public
float
getAscent
()
Returns
- the distance from the baseline to the top, which is usually negative.
public
float
getDescent
()
Returns
- the distance from the baseline to the bottom, which is usually positive.
public
float
getLeading
()
Returns
- the gap between the lines.
public
synchronized
Letter
getLetter
(char pCharacter)
public
float
getLineHeight
()
public
synchronized
void
invalidateLetters
()
public
void
prepareLetters
(char... pCharacters)
public
synchronized
void
update
(GLState pGLState)
Protected Methods
protected
void
drawLetter
(String pCharacterAsString, float pLeft, float pTop)
protected
void
updateTextBounds
(String pCharacterAsString)