diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-04-19 12:46:53 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-19 17:08:38 +0000 |
commit | f51a02a29e10fcc490ba28f44d43f50104f940ed (patch) | |
tree | 354215ff5deeea419ce5a88b369535b5e4468a62 /core/fxge/ge/fx_ge_linux.cpp | |
parent | 2a473dbecab2b47c513de9127a2cddf4c2800306 (diff) | |
download | pdfium-f51a02a29e10fcc490ba28f44d43f50104f940ed.tar.xz |
Cleanup codepage and charset definitions.
This Cl cleans up the unused defines in fx_codepage.h. The
FXFONT_CHARSET_ defines are replaced with fx_codepage defines, this
moves fx_codepage into core instead of xfa only. Static asserts are
added to verify the public/ charsets match the fx_codepage charsets.
Change-Id: Ie2f749e093de60a9a6743128a1fb087912e4cc96
Reviewed-on: https://pdfium-review.googlesource.com/4316
Commit-Queue: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core/fxge/ge/fx_ge_linux.cpp')
-rw-r--r-- | core/fxge/ge/fx_ge_linux.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/fxge/ge/fx_ge_linux.cpp b/core/fxge/ge/fx_ge_linux.cpp index 502a3674ab..8d2c496c19 100644 --- a/core/fxge/ge/fx_ge_linux.cpp +++ b/core/fxge/ge/fx_ge_linux.cpp @@ -6,6 +6,7 @@ #include <memory> +#include "core/fxcrt/fx_codepage.h" #include "core/fxge/cfx_gemodule.h" #include "core/fxge/ge/cfx_folderfontinfo.h" #include "core/fxge/ifx_systemfontinfo.h" @@ -90,7 +91,7 @@ void* CFX_LinuxFontInfo::MapFont(int weight, } bool bCJK = true; switch (charset) { - case FXFONT_SHIFTJIS_CHARSET: { + case FX_CHARSET_ShiftJIS: { size_t index = GetJapanesePreference(cstr_face, weight, pitch_family); ASSERT(index < FX_ArraySize(g_LinuxGpFontList)); for (size_t i = 0; i < kLinuxGpNameSize; i++) { @@ -100,7 +101,7 @@ void* CFX_LinuxFontInfo::MapFont(int weight, } break; } - case FXFONT_GB2312_CHARSET: { + case FX_CHARSET_ChineseSimplified: { for (size_t i = 0; i < FX_ArraySize(g_LinuxGbFontList); ++i) { auto it = m_FontList.find(g_LinuxGbFontList[i]); if (it != m_FontList.end()) @@ -108,7 +109,7 @@ void* CFX_LinuxFontInfo::MapFont(int weight, } break; } - case FXFONT_CHINESEBIG5_CHARSET: { + case FX_CHARSET_ChineseTraditional: { for (size_t i = 0; i < FX_ArraySize(g_LinuxB5FontList); ++i) { auto it = m_FontList.find(g_LinuxB5FontList[i]); if (it != m_FontList.end()) @@ -116,7 +117,7 @@ void* CFX_LinuxFontInfo::MapFont(int weight, } break; } - case FXFONT_HANGUL_CHARSET: { + case FX_CHARSET_Hangul: { for (size_t i = 0; i < FX_ArraySize(g_LinuxHGFontList); ++i) { auto it = m_FontList.find(g_LinuxHGFontList[i]); if (it != m_FontList.end()) |