RedM Natives

REGISTER_FONT_ID

Registers a specified font name for use with text draw commands.

Hash0xACF6D8EE
Runtime nameRegisterFontId
NamespaceCFX
SideClient
NameOfficial
Docs

Signature

int REGISTER_FONT_ID(char* fontName);

Parameters

NameTypeDescription
fontNamechar*

The name of the font in the GFx font library.

Returns int — An index to use with [SET_TEXT_FONT](#\_0x66E0276CC5F6B9DA) and similar natives.

Description

Cfx.re native reference

Registers a specified font name for use with text draw commands.

Usage

Lua
local retval = RegisterFontId(fontName)

-- always works, by hash
local retval = Citizen.InvokeNative(0xacf6d8ee, fontName, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = RegisterFontId(fontName);

// by hash
const retval = Citizen.invokeNative('0xacf6d8ee', fontName, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0xacf6d8ee, fontName);

Sources

Cfx.re native reference

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.