Trace logging for fonts.
This commit is contained in:
parent
4e493e2cbc
commit
d4ff829c26
|
@ -21,6 +21,7 @@
|
|||
#include <font/fontconfig.h>
|
||||
#include <pgm_base.h>
|
||||
#include <wx/log.h>
|
||||
#include <trace_helpers.h>
|
||||
|
||||
using namespace fontconfig;
|
||||
|
||||
|
@ -147,6 +148,8 @@ void FONTCONFIG::ListFonts( std::vector<std::string>& aFonts )
|
|||
FcStrList* langStrList = FcStrListCreate( langStrSet );
|
||||
FcChar8* langStr = FcStrListNext( langStrList );
|
||||
|
||||
std::string theFamily( reinterpret_cast<char *>( family ) );
|
||||
|
||||
if( !langStr )
|
||||
{
|
||||
// Symbol fonts (Wingdings, etc.) have no language
|
||||
|
@ -162,6 +165,11 @@ void FONTCONFIG::ListFonts( std::vector<std::string>& aFonts )
|
|||
langSupported = true;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogTrace( traceFonts, "Font '%s' language '%s' not supported by OS.",
|
||||
theFamily, langWxStr );
|
||||
}
|
||||
|
||||
langStr = FcStrListNext( langStrList );
|
||||
}
|
||||
|
@ -173,7 +181,6 @@ void FONTCONFIG::ListFonts( std::vector<std::string>& aFonts )
|
|||
continue;
|
||||
|
||||
std::string theFile( reinterpret_cast<char *>( file ) );
|
||||
std::string theFamily( reinterpret_cast<char *>( family ) );
|
||||
std::string theStyle( reinterpret_cast<char *>( style ) );
|
||||
FONTINFO fontInfo( theFile, theStyle, theFamily );
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ const wxChar* const tracePrinting = wxT( "KICAD_PRINT" );
|
|||
const wxChar* const traceAutoSave = wxT( "KICAD_AUTOSAVE" );
|
||||
const wxChar* const tracePathsAndFiles = wxT( "KICAD_PATHS_AND_FILES" );
|
||||
const wxChar* const traceLocale = wxT( "KICAD_LOCALE" );
|
||||
const wxChar* const traceFonts = wxT( "KICAD_FONTS" );
|
||||
const wxChar* const traceScreen = wxT( "KICAD_SCREEN" );
|
||||
const wxChar* const traceZoomScroll = wxT( "KICAD_ZOOM_SCROLL" );
|
||||
const wxChar* const traceSymbolResolver = wxT( "KICAD_SYM_RESOLVE" );
|
||||
|
|
|
@ -148,6 +148,13 @@ extern const wxChar* const tracePathsAndFiles;
|
|||
*/
|
||||
extern const wxChar* const traceLocale;
|
||||
|
||||
/**
|
||||
* Flag to enable locale debug output.
|
||||
*
|
||||
* Use "KICAD_FONTS" to enable.
|
||||
*/
|
||||
extern const wxChar* const traceFonts;
|
||||
|
||||
/**
|
||||
* Flag to enable debug output of #BASE_SCREEN and it's derivatives.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue