updateOffset(xOffset, yOffset)
Updates the x and/or y offset that the font is rendered from. This updates all of the texture frames, so be careful how often it is called.
Note that the values given for the x and y properties are either ADDED to or SUBTRACTED from (if negative) the existing offsetX/Y values of the characters.
So if the current offsetY is 8 and you want it to start rendering from y16 you would call updateOffset(0, 8) to add 8 to the current y offset.
Parameters
Name | Type | Argument | Default | Description |
---|---|---|---|---|
xOffset | number | <optional> | 0 | If the font set doesn't start at the top left of the given image, specify the X coordinate offset here. |
yOffset | number | <optional> | 0 | If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here. |
- Source code: gameobjects/RetroFont.js (Line 514)
Please login to continue.