summaryrefslogtreecommitdiff
path: root/core/fxge/apple
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-06-21 14:38:27 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-21 14:38:28 -0700
commit907a5223ea5abd09878de20cc74c59ebd0d6c3c8 (patch)
tree7dba8b090eda4f65da57d1979bdb02cedd273055 /core/fxge/apple
parent56a8b1944d555ed65dda97164b702a9a657485ca (diff)
downloadpdfium-907a5223ea5abd09878de20cc74c59ebd0d6c3c8.tar.xz
Use FXFONT defines in place of integers.
Fix nits along the way. Review-Url: https://codereview.chromium.org/2083943003
Diffstat (limited to 'core/fxge/apple')
-rw-r--r--core/fxge/apple/fx_mac_imp.cpp12
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(