getRenderedCharacterHeight
GET_RENDERED_CHARACTER_HEIGHT0xDB88A37483346780The GTA V native GET_RENDERED_CHARACTER_HEIGHT of the HUD namespace, as LS:MP client scripts call it: the global function getRenderedCharacterHeight, in JavaScript and in Lua.
getRenderedCharacterHeight(size: number, font: number): numbergetRenderedCharacterHeight(size: number, font: integer): numberUsage
JavaScript
const value = getRenderedCharacterHeight(size, font);Lua
local value = getRenderedCharacterHeight(size, font)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
size | float | number | number |
font | int | number | integer |
Returns
float JavaScript number, Lua numberNotes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
This gets the height of the FONT and not the total text. You need to get the number of lines your text uses, and get the height of a newline (I'm using a smaller value) to get the total text height.
Reference
- Namespace
- HUD HUD
- In the game
float GET_RENDERED_CHARACTER_HEIGHT(float size, int font)- Hash
0xDB88A37483346780- Formerly
_GET_TEXT_SCALE_HEIGHT