From ea3c3be83dae12ef682c68fc7cf906d790fd9f84 Mon Sep 17 00:00:00 2001 From: npm Date: Mon, 19 Sep 2016 07:24:33 -0700 Subject: 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 --- core/fxge/win32/fx_win32_device.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'core/fxge/win32') 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 { -- cgit v1.2.3