diff options
author | npm <npm@chromium.org> | 2016-09-19 07:24:33 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-19 07:24:33 -0700 |
commit | ea3c3be83dae12ef682c68fc7cf906d790fd9f84 (patch) | |
tree | cdaca6bc4a4b9de627e45b90c64d4bd197fd8940 /core/fpdfapi | |
parent | 2f8568ef91156d2deb8411c427fbb52f880ccc34 (diff) | |
download | pdfium-ea3c3be83dae12ef682c68fc7cf906d790fd9f84.tar.xz |
Remove duplicated charset definitions, and move them to fx_font.h
PWL_FontMap does not need its own charset definitions. fx_edit.h does
not need to define DEFAULT_CHARSET. XFA have their own definitions.
They look different in that most are MAC or MSWin charset definitions.
So they are left untouched. public/fpdf_sysfontinfo.h duplicate ones
were left untouched due to being in public folder.
Review-Url: https://codereview.chromium.org/2347313002
Diffstat (limited to 'core/fpdfapi')
-rw-r--r-- | core/fpdfapi/fpdf_parser/cpdf_document.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/core/fpdfapi/fpdf_parser/cpdf_document.cpp b/core/fpdfapi/fpdf_parser/cpdf_document.cpp index 75a88b726f..d3909ceaec 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_document.cpp +++ b/core/fpdfapi/fpdf_parser/cpdf_document.cpp @@ -779,7 +779,7 @@ CPDF_Dictionary* CPDF_Document::ProcessbCJK( pWidthArray->AddInteger(814); Insert(0x21, 0x7e, pWidthArray); break; - case FXFONT_HANGEUL_CHARSET: + case FXFONT_HANGUL_CHARSET: cmap = bVert ? "KSCms-UHC-V" : "KSCms-UHC-H"; ordering = "Korea1"; supplement = 2; @@ -825,7 +825,7 @@ CPDF_Font* CPDF_Document::AddFont(CFX_Font* pFont, int charset, FX_BOOL bVert) { bool bCJK = charset == FXFONT_CHINESEBIG5_CHARSET || charset == FXFONT_GB2312_CHARSET || - charset == FXFONT_HANGEUL_CHARSET || + charset == FXFONT_HANGUL_CHARSET || charset == FXFONT_SHIFTJIS_CHARSET; CFX_ByteString basefont = pFont->GetFamilyName(); basefont.Replace(" ", ""); @@ -944,12 +944,12 @@ CPDF_Font* CPDF_Document::AddWindowsFont(LOGFONTA* pLogFont, (pLogFont->lfPitchAndFamily & 3) == FIXED_PITCH, (pLogFont->lfPitchAndFamily & 0xf8) == FF_ROMAN, (pLogFont->lfPitchAndFamily & 0xf8) == FF_SCRIPT, - pLogFont->lfCharSet == SYMBOL_CHARSET); + pLogFont->lfCharSet == FXFONT_SYMBOL_CHARSET); - bool bCJK = pLogFont->lfCharSet == CHINESEBIG5_CHARSET || - pLogFont->lfCharSet == GB2312_CHARSET || - pLogFont->lfCharSet == HANGEUL_CHARSET || - pLogFont->lfCharSet == SHIFTJIS_CHARSET; + bool bCJK = pLogFont->lfCharSet == FXFONT_CHINESEBIG5_CHARSET || + pLogFont->lfCharSet == FXFONT_GB2312_CHARSET || + pLogFont->lfCharSet == FXFONT_HANGUL_CHARSET || + pLogFont->lfCharSet == FXFONT_SHIFTJIS_CHARSET; CFX_ByteString basefont; if (bTranslateName && bCJK) basefont = FPDF_GetPSNameFromTT(hDC); @@ -969,9 +969,9 @@ CPDF_Font* CPDF_Document::AddWindowsFont(LOGFONTA* pLogFont, pBaseDict->SetNameFor("Type", "Font"); CPDF_Dictionary* pFontDict = pBaseDict; if (!bCJK) { - if (pLogFont->lfCharSet == ANSI_CHARSET || - pLogFont->lfCharSet == DEFAULT_CHARSET || - pLogFont->lfCharSet == SYMBOL_CHARSET) { + if (pLogFont->lfCharSet == FXFONT_ANSI_CHARSET || + pLogFont->lfCharSet == FXFONT_DEFAULT_CHARSET || + pLogFont->lfCharSet == FXFONT_SYMBOL_CHARSET) { pBaseDict->SetNameFor("Encoding", "WinAnsiEncoding"); } else { CalculateEncodingDict(pLogFont->lfCharSet, pBaseDict); |