fcft_init(3)
π NAME π
fcft_init β initialize the library. Yes bestie, this is the fcft_init(3) page from the fcft manual, and itβs literally the βwake up the libraryβ ritual. π
β¨ SYNOPSIS β¨
#include <fcft/fcft.h>
bool fcft_init(
enum fcft_log_colorize colorize, bool do_syslog, enum fcft_log_class
log_level);
π¦ DESCRIPTION π¦
Okay so fcft_init() initializes the fcft library, and it must be called before instantiating any fonts. No cap, itβs the prerequisite. π«Ά
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(). Like, get the vibes set up first, yβknow? β¨
π¨ The colorize parameter π¨
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. Cute. π
π The do_syslog parameter π
If do_syslog is set, fcft will log to syslog, in addition to the regular logging on stderr.
β οΈ Note that fcft does not callopenlog(), even ifdo_syslogis set. Do this from the calling application. Before, or after callingfcft_init()does not matter, as long as it is done before calling any other fcft API functions. π
π₯ The log_level parameter π₯
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; settingFCFT_LOG_CLASS_INFO, also enablesFCFT_LOG_CLASS_WARNINGandFCFT_LOG_CLASS_ERROR. Itβs giving βpackage dealβ, not βpick and chooseβ. periodt.
π RETURN VALUE π
True if initialization was successful, otherwise false. Slay. β
π SEE ALSO π
fcft_fini() β go check out that page too, bestie. π«Ά
byeee bestie π this page is from fcft version 3.3.3, dated 2026-04-09 β mwah! π«Ά
π¦ where this page comes from
- alpine 3.24: fcft-doc 3.3.3-r0 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms