@blooper.gg/toodle / text/MsdfFont / MsdfFont
Class: MsdfFont
Defined in: text/MsdfFont.ts:26
Constructors
Constructor
new MsdfFont(
id
,json
,imageBitmap
):MsdfFont
Defined in: text/MsdfFont.ts:41
Parameters
id
string
json
MsdfFontJson
imageBitmap
ImageBitmap
Returns
MsdfFont
Properties
charBuffer
charBuffer:
Float32Array
Defined in: text/MsdfFont.ts:35
a binary buffer of character data for loading into the gpu
charCount
charCount:
number
Defined in: text/MsdfFont.ts:31
charset
charset:
string
[]
Defined in: text/MsdfFont.ts:30
the set of available characters in the font texture
id
id:
string
Defined in: text/MsdfFont.ts:42
imageBitmap
imageBitmap:
ImageBitmap
Defined in: text/MsdfFont.ts:44
json
json:
MsdfFontJson
Defined in: text/MsdfFont.ts:43
lineHeight
lineHeight:
number
Defined in: text/MsdfFont.ts:32
name
name:
string
Defined in: text/MsdfFont.ts:28
the name of the font
Accessors
fallbackCharacter
Set Signature
set fallbackCharacter(
character
):void
Defined in: text/MsdfFont.ts:137
Parameters
character
string
Returns
void
Methods
getChar()
getChar(
charCode
):MsdfChar
Defined in: text/MsdfFont.ts:86
Parameters
charCode
number
Returns
getXAdvance()
getXAdvance(
charCode
,nextCharCode
):number
Defined in: text/MsdfFont.ts:103
Parameters
charCode
number
nextCharCode
number
= -1
Returns
number
create()
static
create(id
,fontJsonUrl
):Promise
<MsdfFont
>
Defined in: text/MsdfFont.ts:114
Parameters
id
string
fontJsonUrl
URL
Returns
Promise
<MsdfFont
>