Fix Windows build error

bc Microsoft owns all the words
This commit is contained in:
Seth Hillbrand 2023-01-25 16:44:35 -08:00
parent d25b96d72d
commit bcc1e28bab
3 changed files with 18 additions and 18 deletions

View File

@ -64,7 +64,7 @@ FONTCONFIG* Fontconfig()
FONTCONFIG::FF_RESULT FONTCONFIG::FindFont( const wxString &aFontName, wxString &aFontFile,
bool aBold, bool aItalic )
{
FF_RESULT retval = FF_RESULT::ERROR;
FF_RESULT retval = FF_RESULT::FF_ERROR;
wxString qualifiedFontName = aFontName;
if( aBold )
@ -93,7 +93,7 @@ FONTCONFIG::FF_RESULT FONTCONFIG::FindFont( const wxString &aFontName, wxString
FcChar8* family = nullptr;
FcChar8* style = nullptr;
retval = FF_RESULT::SUBSTITUTE;
retval = FF_RESULT::FF_SUBSTITUTE;
if( FcPatternGetString( font, FC_FAMILY, 0, &family ) == FcResultMatch )
{
@ -132,15 +132,15 @@ FONTCONFIG::FF_RESULT FONTCONFIG::FindFont( const wxString &aFontName, wxString
if( fontName.Lower().StartsWith( aFontName.Lower() ) )
{
if( ( aBold && !has_bold ) && ( aItalic && !has_ital ) )
retval = FF_RESULT::MISSING_BOLD_ITAL;
retval = FF_RESULT::FF_MISSING_BOLD_ITAL;
else if( aBold && !has_bold )
retval = FF_RESULT::MISSING_BOLD;
retval = FF_RESULT::FF_MISSING_BOLD;
else if( aItalic && !has_ital )
retval = FF_RESULT::MISSING_ITAL;
retval = FF_RESULT::FF_MISSING_ITAL;
else if( ( aBold != has_bold ) || ( aItalic != has_ital ) )
retval = FF_RESULT::SUBSTITUTE;
retval = FF_RESULT::FF_SUBSTITUTE;
else
retval = FF_RESULT::OK;
retval = FF_RESULT::FF_OK;
}
}
}
@ -148,9 +148,9 @@ FONTCONFIG::FF_RESULT FONTCONFIG::FindFont( const wxString &aFontName, wxString
FcPatternDestroy( font );
}
if( retval == FF_RESULT::ERROR )
if( retval == FF_RESULT::FF_ERROR )
wxLogWarning( _( "Error loading font '%s'." ), qualifiedFontName );
else if( retval == FF_RESULT::SUBSTITUTE )
else if( retval == FF_RESULT::FF_SUBSTITUTE )
wxLogWarning( _( "Font '%s' not found; substituting '%s'." ), qualifiedFontName, fontName );
FcPatternDestroy( pat );

View File

@ -97,13 +97,13 @@ OUTLINE_FONT* OUTLINE_FONT::LoadFont( const wxString& aFontName, bool aBold, boo
fc::FF_RESULT retval = Fontconfig()->FindFont( aFontName, fontFile, aBold, aItalic );
if( retval == fc::FF_RESULT::MISSING_BOLD || retval == fc::FF_RESULT::MISSING_BOLD_ITAL )
if( retval == fc::FF_RESULT::FF_MISSING_BOLD || retval == fc::FF_RESULT::FF_MISSING_BOLD_ITAL )
font->SetFakeBold();
if( retval == fc::FF_RESULT::MISSING_ITAL || retval == fc::FF_RESULT::MISSING_BOLD_ITAL )
if( retval == fc::FF_RESULT::FF_MISSING_ITAL || retval == fc::FF_RESULT::FF_MISSING_BOLD_ITAL )
font->SetFakeItal();
if( retval != fc::FF_RESULT::ERROR )
if( retval != fc::FF_RESULT::FF_ERROR )
(void) font->loadFace( fontFile );
font->m_fontName = aFontName; // Keep asked-for name, even if we substituted.

View File

@ -38,12 +38,12 @@ public:
enum class FF_RESULT
{
OK,
ERROR,
SUBSTITUTE,
MISSING_BOLD,
MISSING_ITAL,
MISSING_BOLD_ITAL
FF_OK,
FF_ERROR,
FF_SUBSTITUTE,
FF_MISSING_BOLD,
FF_MISSING_ITAL,
FF_MISSING_BOLD_ITAL
};
/**