Class me.Font
Extends
Object.
Defined in: <build/melonJS-0.9.3.js>.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
me.Font(font, size, color, align)
a generic system font object.
|
| Method Attributes | Method Name and Description |
|---|---|
|
bold()
make the font bold
|
|
|
draw(context, text, x, y)
draw a text at the specified coord
|
|
|
italic()
make the font italic
|
|
|
measureText(context, text)
measure the given test width
|
|
|
set(font, size, color, align)
Change the font settings
|
Method Detail
bold()
make the font bold
draw(context, text, x, y)
draw a text at the specified coord
- Parameters:
- {Context} context
- 2D Context
- {String} text
- {int} x
- {int} y
italic()
make the font italic
{int}
measureText(context, text)
measure the given test width
- Parameters:
- {Context} context
- 2D Context
- {String} text
- Returns:
- {int} width
set(font, size, color, align)
Change the font settings