Dev Blog
Info
Dev
Overview
Definitions
Lua API
Data Types
Tutorials
Newsletter
Dev
Home
Data Types
Definitions
EntityDef
AttributeDef
Lua Libraries
s3sprite
Dev - Lua Libraries
Lua Command:
s3sprite
.
getFontWidth
Parameters
string
text
int
fontID
Return Values
int
width
Signature
int
width
= s3sprite.getFontWidth(
string
text
,
int
fontID
)
Description
Get the width of
text
in pixels, when it is written using the font with the given
fontID
.
Note:
This command returns the actual text width in pixels when no scaling is applied.