KiCad PCB EDA Suite
fontconfig.cpp File Reference
#include <fontconfig/fontconfig.h>
#include <font/fontconfig.h>
#include <pgm_base.h>
#include <wx/log.h>
#include <trace_helpers.h>

Go to the source code of this file.

Functions

static FcChar8 * wxStringToFcChar8 (const wxString &str)
 
FONTCONFIGFontconfig ()
 

Variables

static FONTCONFIGg_config = nullptr
 

Function Documentation

◆ Fontconfig()

FONTCONFIG * Fontconfig ( )

Definition at line 52 of file fontconfig.cpp.

53{
54 if( !g_config )
55 {
56 FcInit();
57 g_config = new FONTCONFIG();
58 }
59
60 return g_config;
61}
static FONTCONFIG * g_config
Definition: fontconfig.cpp:30

References g_config.

Referenced by FONT_CHOICE::FONT_CHOICE(), FIELDS_GRID_TABLE< T >::initGrid(), and KIFONT::OUTLINE_FONT::LoadFont().

◆ wxStringToFcChar8()

static FcChar8 * wxStringToFcChar8 ( const wxString &  str)
inlinestatic

Definition at line 33 of file fontconfig.cpp.

34{
35 wxScopedCharBuffer const fcBuffer = str.ToUTF8();
36 return (FcChar8*) fcBuffer.data();
37}

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

Variable Documentation

◆ g_config

FONTCONFIG* g_config = nullptr
static

Definition at line 30 of file fontconfig.cpp.

Referenced by Fontconfig().