| Index: core/src/fxge/ge/fx_ge_linux.cpp
|
| diff --git a/core/src/fxge/ge/fx_ge_linux.cpp b/core/src/fxge/ge/fx_ge_linux.cpp
|
| index 631ff8e93f33af63b777f48220b1dd7c015de89d..d0dca860a0d2f101187622ff97f28f68a4f973a9 100644
|
| --- a/core/src/fxge/ge/fx_ge_linux.cpp
|
| +++ b/core/src/fxge/ge/fx_ge_linux.cpp
|
| @@ -30,9 +30,12 @@ Base14Substs[] = {
|
| class CFX_LinuxFontInfo : public CFX_FolderFontInfo
|
| {
|
| public:
|
| - virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* family, FX_BOOL& bExact);
|
| - FX_BOOL ParseFontCfg();
|
| - void* FindFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* family, FX_BOOL bMatchName);
|
| + void* MapFont(int weight, bool bItalic, int charset, int pitch_family,
|
| + const FX_CHAR* family, int& iExact) override;
|
| +
|
| + bool ParseFontCfg();
|
| + void* FindFont(int weight, bool bItalic, int charset, int pitch_family,
|
| + const FX_CHAR* family, bool bMatchName);
|
| };
|
| #define LINUX_GPNAMESIZE 6
|
| static const struct {
|
| @@ -78,21 +81,21 @@ static int32_t GetJapanesePreference(const FX_CHAR* facearr, int weight, int pic
|
| }
|
| return 2;
|
| }
|
| -void* CFX_LinuxFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* cstr_face, FX_BOOL& bExact)
|
| +void* CFX_LinuxFontInfo::MapFont(int weight, bool bItalic, int charset, int pitch_family, const FX_CHAR* cstr_face, int& iExact)
|
| {
|
| CFX_ByteString face = cstr_face;
|
| int iBaseFont;
|
| for (iBaseFont = 0; iBaseFont < 12; iBaseFont ++)
|
| if (face == CFX_ByteStringC(Base14Substs[iBaseFont].m_pName)) {
|
| face = Base14Substs[iBaseFont].m_pSubstName;
|
| - bExact = TRUE;
|
| + iExact = true;
|
| break;
|
| }
|
| if (iBaseFont < 12) {
|
| return GetFont(face);
|
| }
|
| void* p = NULL;
|
| - FX_BOOL bCJK = TRUE;
|
| + bool bCJK = true;
|
| switch (charset) {
|
| case FXFONT_SHIFTJIS_CHARSET: {
|
| int32_t index = GetJapanesePreference(cstr_face, weight, pitch_family);
|
| @@ -130,7 +133,7 @@ void* CFX_LinuxFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int p
|
| }
|
| break;
|
| default:
|
| - bCJK = FALSE;
|
| + bCJK = false;
|
| break;
|
| }
|
| if (charset == FXFONT_ANSI_CHARSET && (pitch_family & FXFONT_FF_FIXEDPITCH)) {
|
| @@ -158,7 +161,7 @@ static FX_DWORD _LinuxGetCharset(int charset)
|
| }
|
| return 0;
|
| }
|
| -static int32_t _LinuxGetSimilarValue(int weight, FX_BOOL bItalic, int pitch_family, FX_DWORD style)
|
| +static int32_t _LinuxGetSimilarValue(int weight, bool bItalic, int pitch_family, FX_DWORD style)
|
| {
|
| int32_t iSimilarValue = 0;
|
| if ((style & FXFONT_BOLD) == (weight > 400)) {
|
| @@ -178,7 +181,7 @@ static int32_t _LinuxGetSimilarValue(int weight, FX_BOOL bItalic, int pitch_fami
|
| }
|
| return iSimilarValue;
|
| }
|
| -void* CFX_LinuxFontInfo::FindFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* family, FX_BOOL bMatchName)
|
| +void* CFX_LinuxFontInfo::FindFont(int weight, bool bItalic, int charset, int pitch_family, const FX_CHAR* family, bool bMatchName)
|
| {
|
| CFontFaceInfo* pFind = NULL;
|
| FX_DWORD charset_flag = _LinuxGetCharset(charset);
|
| @@ -218,9 +221,9 @@ IFX_SystemFontInfo* IFX_SystemFontInfo::CreateDefault()
|
| }
|
| return pInfo;
|
| }
|
| -FX_BOOL CFX_LinuxFontInfo::ParseFontCfg()
|
| +bool CFX_LinuxFontInfo::ParseFontCfg()
|
| {
|
| - return FALSE;
|
| + return false;
|
| }
|
| void CFX_GEModule::InitPlatform()
|
| {
|
|
|