---
name: "fcft_init"
section: "3"
platform: "linux"
package: "fcft"
version: "3.3.3-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/fcft_init"
---

# fcft\_init(3)

initialize the library

## NAME

fcft\_init - initialize the library

## SYNOPSIS

**#include \<fcft/fcft.h\>**

**bool fcft\_init(**

**enum fcft\_log\_colorize** *colorize***, bool** *do\_syslog***,** **enum fcft\_log\_class** *log\_level***);**

## DESCRIPTION

**fcft\_init**() initializes the fcft library, and must be called before instantiating any fonts.

Since it also initializes logging, you may also want to ensure it is called before any other functions affecting the library state. For example, **fcft\_set\_scaling\_filter**().

*colorize* is one of:

```
enum fcft_log_colorize {
    FCFT_LOG_COLORIZE_NEVER,
    FCFT_LOG_COLORIZE_ALWAYS,
    FCFT_LOG_COLORIZE_AUTO
};
```

**FCFT\_LOG\_COLORIZE\_AUTO** enables colors if stderr is a TTY.

if *do\_syslog* is set, fcft will log to syslog, in addition to the regular logging on stderr.

Note that fcft does not call **openlog**(), even if *do\_syslog* is set. Do this from the calling application. Before, or after calling **fcft\_init**() does not matter, as long as it is done before calling any other fcft API functions.

Finally, *log\_level* configures which types of log messages that will be shown.

```
enum fcft_log_class {
    FCFT_LOG_CLASS_NONE,
    FCFT_LOG_CLASS_ERROR,
    FCFT_LOG_CLASS_WARNING,
    FCFT_LOG_CLASS_INFO,
    FCFT_LOG_CLASS_DEBUG
};
```

Note that this is not a bitmask; setting **FCFT\_LOG\_CLASS\_INFO**, also enables **FCFT\_LOG\_CLASS\_WARNING** and **FCFT\_LOG\_CLASS\_ERROR**.

## RETURN VALUE

True if initialization was successful, otherwise false.

## SEE ALSO

**fcft\_fini**()
