21#ifndef KICAD_FONTCONFIG_H 
   22#define KICAD_FONTCONFIG_H 
   24#include <fontconfig/fontconfig.h> 
   30#include <unordered_map> 
   62    FF_RESULT FindFont( 
const wxString& aFontName, wxString& aFontFile, 
int& aFaceIndex, 
bool aBold,
 
   63                        bool aItalic, 
const std::vector<wxString>* aEmbeddedFiles = 
nullptr );
 
   74    void ListFonts( std::vector<std::string>& aFonts, 
const std::string& aDesiredLang,
 
   75                    const std::vector<wxString>* aEmbeddedFiles = 
nullptr, 
bool aForce = 
false );
 
   82    static void SetReporter( 
REPORTER* aReporter );
 
  100    bool isLanguageMatch( 
const wxString& aSearchLang, 
const wxString& aSupportedLang );
 
  110                              std::unordered_map<std::string, std::string>& aFamStringMap );
 
 
 
A pure virtual class used to derive REPORTER objects from.
 
static REPORTER * s_reporter
 
void getAllFamilyStrings(FONTCONFIG_PAT &aPat, std::unordered_map< std::string, std::string > &aFamStringMap)
Get a list of all family name strings mapped to lang.
 
static wxString Version()
 
std::map< std::string, FONTINFO > m_fontInfoCache
 
std::string getFcString(FONTCONFIG_PAT &aPat, const char *aObj, int aIdx)
Wrapper of FcPatternGetString to return a std::string.
 
std::string getFamilyStringByLang(FONTCONFIG_PAT &APat, const wxString &aDesiredLang)
Get a family name based on desired language.
 
bool isLanguageMatch(const wxString &aSearchLang, const wxString &aSupportedLang)
Match two rfc 3306 language entries, used for when searching for matching family names.
 
wxString m_fontCacheLastLang
 
KICOMMON_API fontconfig::FONTCONFIG * Fontconfig()
 
A simple wrapper to avoid exporting fontconfig in the header.