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

Unified Diff: core/fxge/ge/fx_ge_fontmap.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/fxge/ge/fx_ge_font.cpp ('k') | core/fxge/ge/fx_ge_text.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxge/ge/fx_ge_fontmap.cpp
diff --git a/core/fxge/ge/fx_ge_fontmap.cpp b/core/fxge/ge/fx_ge_fontmap.cpp
index 81e31379137a86ebb310090177e6521ae7a3f17c..cc7e9f1aa20c7b573eac91481f60deaa57ffeca6 100644
--- a/core/fxge/ge/fx_ge_fontmap.cpp
+++ b/core/fxge/ge/fx_ge_fontmap.cpp
@@ -293,7 +293,7 @@ uint8_t GetCharsetFromCodePage(uint16_t codepage) {
});
if (pCharmap < pEnd && codepage == pCharmap->codepage)
return pCharmap->charset;
- return 1;
+ return FXFONT_DEFAULT_CHARSET;
}
CFX_ByteString GetFontFamily(CFX_ByteString fontName, int nStyle) {
@@ -412,14 +412,15 @@ int32_t GetSimilarValue(int weight,
CFX_SubstFont::CFX_SubstFont() {
m_ExtHandle = nullptr;
- m_Charset = 0;
+ m_Charset = FXFONT_ANSI_CHARSET;
m_SubstFlags = 0;
m_Weight = 0;
m_ItalicAngle = 0;
- m_bSubstOfCJK = FALSE;
+ m_bSubstCJK = false;
m_WeightCJK = 0;
- m_bItlicCJK = FALSE;
+ m_bItalicCJK = false;
}
+
CTTFontDesc::~CTTFontDesc() {
if (m_Type == 1) {
if (m_SingleFace.m_pFace) {
@@ -1057,14 +1058,14 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const CFX_ByteString& name,
weight = old_weight;
}
} else {
- pSubstFont->m_bSubstOfCJK = TRUE;
+ pSubstFont->m_bSubstCJK = true;
if (nStyle) {
pSubstFont->m_WeightCJK = weight;
} else {
pSubstFont->m_WeightCJK = FXFONT_FW_NORMAL;
}
if (nStyle & FX_FONT_STYLE_Italic) {
- pSubstFont->m_bItlicCJK = TRUE;
+ pSubstFont->m_bItalicCJK = true;
}
}
} else {
« no previous file with comments | « core/fxge/ge/fx_ge_font.cpp ('k') | core/fxge/ge/fx_ge_text.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698