diff options
Diffstat (limited to 'core/fxge/apple')
-rw-r--r-- | core/fxge/apple/fx_mac_imp.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/fxge/apple/fx_mac_imp.cpp b/core/fxge/apple/fx_mac_imp.cpp index 528b7274db..489ce816cc 100644 --- a/core/fxge/apple/fx_mac_imp.cpp +++ b/core/fxge/apple/fx_mac_imp.cpp @@ -28,6 +28,9 @@ static const struct { class CFX_MacFontInfo : public CFX_FolderFontInfo { public: + CFX_MacFontInfo() {} + ~CFX_MacFontInfo() override {} + // CFX_FolderFontInfo void* MapFont(int weight, FX_BOOL bItalic, @@ -41,12 +44,12 @@ class CFX_MacFontInfo : public CFX_FolderFontInfo { #define JAPAN_MINCHO "Hiragino Mincho Pro W6" static void GetJapanesePreference(CFX_ByteString& face, int weight, - int picth_family) { + int pitch_family) { if (face.Find("Gothic") >= 0) { face = JAPAN_GOTHIC; return; } - if (!(picth_family & FXFONT_FF_ROMAN) && weight > 400) { + if (!(pitch_family & FXFONT_FF_ROMAN) && weight > 400) { face = JAPAN_GOTHIC; } else { face = JAPAN_MINCHO; @@ -93,10 +96,7 @@ void* CFX_MacFontInfo::MapFont(int weight, face = "LiSong Pro Light"; } it = m_FontList.find(face); - if (it != m_FontList.end()) - return it->second; - - return nullptr; + return it != m_FontList.end() ? it->second : nullptr; } std::unique_ptr<IFX_SystemFontInfo> IFX_SystemFontInfo::CreateDefault( |