# CFX::REGISTER_FONT_ID

- **Hash:** `0xACF6D8EE`
- **Namespace:** CFX
- **Runtime name (Lua/JS):** `RegisterFontId`
- **Side:** client (Cfx runtime native)
- **Name status:** official
- **Documentation:** described
- **URL:** https://natives.borderlinerp.com/natives/CFX/REGISTER_FONT_ID

## Signature

```c
int REGISTER_FONT_ID(char* fontName);
```

## Parameters

- `fontName` (`char*`) — 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

*Source: Cfx.re native reference*

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

## Usage

### Lua

```lua
local retval = RegisterFontId(fontName)

-- always available, by hash
local retval = Citizen.InvokeNative(0xacf6d8ee, fontName, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = RegisterFontId(fontName);

// by hash
const retval = Citizen.invokeNative('0xacf6d8ee', fontName, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
int retval = Function.Call<int>((Hash)0xacf6d8ee, fontName);
```

*Sources: Cfx.re native reference.*
