From f51a02a29e10fcc490ba28f44d43f50104f940ed Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 19 Apr 2017 12:46:53 -0400 Subject: Cleanup codepage and charset definitions. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Commit-Queue: Nicolás Peña Reviewed-by: Nicolás Peña --- core/fxge/ge/cfx_facecache.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/fxge/ge/cfx_facecache.cpp') diff --git a/core/fxge/ge/cfx_facecache.cpp b/core/fxge/ge/cfx_facecache.cpp index 2a8e71acf5..0e1dea4bb3 100644 --- a/core/fxge/ge/cfx_facecache.cpp +++ b/core/fxge/ge/cfx_facecache.cpp @@ -10,6 +10,7 @@ #include #include +#include "core/fxcrt/fx_codepage.h" #include "core/fxge/cfx_fontmgr.h" #include "core/fxge/cfx_gemodule.h" #include "core/fxge/cfx_pathdata.h" @@ -165,7 +166,7 @@ CFX_GlyphBitmap* CFX_FaceCache::RenderGlyph(const CFX_Font* pFont, if (index >= CFX_Font::kWeightPowArraySize) return nullptr; pdfium::base::CheckedNumeric level = 0; - if (pSubstFont->m_Charset == FXFONT_SHIFTJIS_CHARSET) + if (pSubstFont->m_Charset == FX_CHARSET_ShiftJIS) level = CFX_Font::s_WeightPow_SHIFTJIS[index] * 2; else level = CFX_Font::s_WeightPow_11[index]; -- cgit v1.2.3