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/fxge/win32 | |
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/fxge/win32')
-rw-r--r-- | core/fxge/win32/fx_win32_device.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp index 9a54dd7f73..061bc0a4d0 100644 --- a/core/fxge/win32/fx_win32_device.cpp +++ b/core/fxge/win32/fx_win32_device.cpp @@ -459,7 +459,7 @@ FX_BOOL CFX_Win32FontInfo::EnumFontList(CFX_FontMapper* pMapper) { m_pMapper = pMapper; LOGFONTA lf; FXSYS_memset(&lf, 0, sizeof(LOGFONTA)); - lf.lfCharSet = DEFAULT_CHARSET; + lf.lfCharSet = FXFONT_DEFAULT_CHARSET; lf.lfFaceName[0] = 0; lf.lfPitchAndFamily = 0; EnumFontFamiliesExA(m_hDC, &lf, (FONTENUMPROCA)FontEnumProc, (uintptr_t) this, @@ -500,7 +500,7 @@ void* CFX_Win32FallbackFontInfo::MapFont(int weight, case FXFONT_SHIFTJIS_CHARSET: case FXFONT_GB2312_CHARSET: case FXFONT_CHINESEBIG5_CHARSET: - case FXFONT_HANGEUL_CHARSET: + case FXFONT_HANGUL_CHARSET: default: bCJK = FALSE; break; @@ -592,17 +592,17 @@ void* CFX_Win32FontInfo::MapFont(int weight, iExact = TRUE; break; } - if (charset == ANSI_CHARSET || charset == SYMBOL_CHARSET) { - charset = DEFAULT_CHARSET; + if (charset == FXFONT_ANSI_CHARSET || charset == FXFONT_SYMBOL_CHARSET) { + charset = FXFONT_DEFAULT_CHARSET; } int subst_pitch_family = pitch_family; switch (charset) { - case SHIFTJIS_CHARSET: + case FXFONT_SHIFTJIS_CHARSET: subst_pitch_family = FF_ROMAN; break; - case CHINESEBIG5_CHARSET: - case HANGUL_CHARSET: - case GB2312_CHARSET: + case FXFONT_CHINESEBIG5_CHARSET: + case FXFONT_HANGUL_CHARSET: + case FXFONT_GB2312_CHARSET: subst_pitch_family = 0; break; } @@ -629,20 +629,20 @@ void* CFX_Win32FontInfo::MapFont(int weight, return hFont; } ::DeleteObject(hFont); - if (charset == DEFAULT_CHARSET) + if (charset == FXFONT_DEFAULT_CHARSET) return nullptr; switch (charset) { - case SHIFTJIS_CHARSET: + case FXFONT_SHIFTJIS_CHARSET: GetJapanesePreference(face, weight, pitch_family); break; - case GB2312_CHARSET: + case FXFONT_GB2312_CHARSET: GetGBPreference(face, weight, pitch_family); break; - case HANGUL_CHARSET: + case FXFONT_HANGUL_CHARSET: face = "Gulim"; break; - case CHINESEBIG5_CHARSET: + case FXFONT_CHINESEBIG5_CHARSET: if (face.Find("MSung") >= 0) { face = "MingLiU"; } else { |