KiCad PCB EDA Suite
Loading...
Searching...
No Matches
fontconfig.cpp File Reference
#include <font/fontconfig.h>
#include <wx/log.h>
#include <trace_helpers.h>
#include <string_utils.h>
#include <macros.h>
#include <cstdint>
#include <reporter.h>
#include <embedded_files.h>

Go to the source code of this file.

Classes

struct  fontconfig::FONTCONFIG_PAT
 A simple wrapper to avoid exporting fontconfig in the header. More...
 

Functions

static void bootstrapFc ()
 This is simply a wrapper to call FcInit() with SEH for Windows.
 
FONTCONFIGFontconfig ()
 

Variables

static FONTCONFIGg_config = nullptr
 
static bool g_fcInitSuccess = false
 

Function Documentation

◆ bootstrapFc()

static void bootstrapFc ( )
static

This is simply a wrapper to call FcInit() with SEH for Windows.

SEH on Windows can only be used in functions without objects that might be unwound (basically objects with destructors). For example, new FONTCONFIG() in Fontconfig() is creating a object with a destructor that might need to be unwound. MSVC catches this and throws a compile error.

Definition at line 78 of file fontconfig.cpp.

References g_fcInitSuccess.

Referenced by Fontconfig().

◆ Fontconfig()

Variable Documentation

◆ g_config

FONTCONFIG* g_config = nullptr
static

Definition at line 39 of file fontconfig.cpp.

Referenced by Fontconfig().

◆ g_fcInitSuccess

bool g_fcInitSuccess = false
static