diff options
author | thestig <thestig@chromium.org> | 2016-06-21 14:38:27 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-21 14:38:28 -0700 |
commit | 907a5223ea5abd09878de20cc74c59ebd0d6c3c8 (patch) | |
tree | 7dba8b090eda4f65da57d1979bdb02cedd273055 /core/fxge/ge/fx_ge_fontmap.cpp | |
parent | 56a8b1944d555ed65dda97164b702a9a657485ca (diff) | |
download | pdfium-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/ge/fx_ge_fontmap.cpp')
-rw-r--r-- | core/fxge/ge/fx_ge_fontmap.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/core/fxge/ge/fx_ge_fontmap.cpp b/core/fxge/ge/fx_ge_fontmap.cpp index 81e3137913..cc7e9f1aa2 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 { |