Index: core/fxge/apple/fx_mac_imp.cpp |
diff --git a/core/fxge/apple/fx_mac_imp.cpp b/core/fxge/apple/fx_mac_imp.cpp |
index 528b7274dbf31a9adc79d317bd76788549901eb9..489ce816cc234e46a9dd11c0cf026fca30daab1a 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( |