Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1019)

Unified Diff: core/fxge/apple/fx_mac_imp.cpp

Issue 2083943003: Use FXFONT defines in place of integers. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nits Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfdoc/include/cpdf_variabletext.h ('k') | core/fxge/ge/fx_ge_font.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « core/fpdfdoc/include/cpdf_variabletext.h ('k') | core/fxge/ge/fx_ge_font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698