KiCad PCB EDA Suite
Loading...
Searching...
No Matches
fontconfig.cpp File Reference
#include <mutex>
#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
 
static std::mutex g_fontConfigMutex
 

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 80 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

◆ g_fontConfigMutex

std::mutex g_fontConfigMutex
static

Definition at line 43 of file fontconfig.cpp.

Referenced by fontconfig::FONTCONFIG::SetReporter().