Class CAAT.Module.Font.Font
Defined in: Font.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Method Attributes | Method Name and Description |
---|---|
create(chars, padding)
|
|
createDefault(padding)
|
|
drawSpriteText(director, time)
|
|
drawText(str, ctx, x, y)
|
|
<static> |
CAAT.Module.Font.Font.getFontMetrics(font)
|
<static> |
CAAT.Module.Font.Font.getFontMetricsCSS(font)
Totally ripped from:
jQuery (offset function)
Daniel Earwicker: http://stackoverflow.com/questions/1134586/how-can-you-find-the-height-of-text-on-an-html-canvas
|
<static> |
CAAT.Module.Font.Font.getFontMetricsNoCSS(font)
|
save()
|
|
setFillStyle(style)
|
|
setFont(font)
|
|
setFontSize(fontSize)
|
|
setFontStyle(style)
|
|
setPadding(padding)
|
|
setStrokeSize(size)
|
|
setStrokeStyle(style)
|
|
stringWidth(str)
|
Method Detail
create(chars, padding)
- Parameters:
- chars
- padding
createDefault(padding)
- Parameters:
- padding
drawSpriteText(director, time)
- Parameters:
- director
- time
drawText(str, ctx, x, y)
- Parameters:
- str
- ctx
- x
- y
getAscent()
getDescent()
getFontData()
<static>
CAAT.Module.Font.Font.getFontMetrics(font)
- Parameters:
- font
<static>
{*}
CAAT.Module.Font.Font.getFontMetricsCSS(font)
Totally ripped from:
jQuery (offset function)
Daniel Earwicker: http://stackoverflow.com/questions/1134586/how-can-you-find-the-height-of-text-on-an-html-canvas
- Parameters:
- font
- Returns:
- {*}
<static>
CAAT.Module.Font.Font.getFontMetricsNoCSS(font)
- Parameters:
- font
save()
setAsSpriteImage()
setFillStyle(style)
- Parameters:
- style
setFont(font)
- Parameters:
- font
setFontSize(fontSize)
- Parameters:
- fontSize
setFontStyle(style)
- Parameters:
- style
setPadding(padding)
- Parameters:
- padding
setStrokeSize(size)
- Parameters:
- size
setStrokeStyle(style)
- Parameters:
- style
stringHeight()
stringWidth(str)
- Parameters:
- str