From 812e96c2b4c5908a1979da5e27cdcecda0d1dfc9 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 13 Mar 2017 16:43:37 -0400 Subject: Replace FX_CHAR and FX_WCHAR with underlying types. Change-Id: I96e0a20d66b9184d22f64d8e4ce0dadd5a78c1e8 Reviewed-on: https://pdfium-review.googlesource.com/2967 Commit-Queue: dsinclair Reviewed-by: Tom Sepez --- core/fxge/ge/cfx_fontmapper.cpp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'core/fxge/ge/cfx_fontmapper.cpp') diff --git a/core/fxge/ge/cfx_fontmapper.cpp b/core/fxge/ge/cfx_fontmapper.cpp index 064fc9610a..622b457396 100644 --- a/core/fxge/ge/cfx_fontmapper.cpp +++ b/core/fxge/ge/cfx_fontmapper.cpp @@ -25,7 +25,7 @@ namespace { const int kNumStandardFonts = 14; -const FX_CHAR* const g_Base14FontNames[kNumStandardFonts] = { +const char* const g_Base14FontNames[kNumStandardFonts] = { "Courier", "Courier-Bold", "Courier-BoldOblique", @@ -43,7 +43,7 @@ const FX_CHAR* const g_Base14FontNames[kNumStandardFonts] = { }; const struct AltFontName { - const FX_CHAR* m_pName; + const char* m_pName; int m_Index; } g_AltFontNames[] = { {"Arial", 4}, @@ -138,8 +138,8 @@ const struct AltFontName { }; const struct AltFontFamily { - const FX_CHAR* m_pFontName; - const FX_CHAR* m_pFontFamily; + const char* m_pFontName; + const char* m_pFontFamily; } g_AltFontFamilies[] = { {"AGaramondPro", "Adobe Garamond Pro"}, {"BankGothicBT-Medium", "BankGothic Md BT"}, @@ -147,7 +147,7 @@ const struct AltFontFamily { }; const struct FX_FontStyle { - const FX_CHAR* style; + const char* style; int32_t len; } g_FontStyles[] = { {"Bold", 4}, {"Italic", 6}, {"BoldItalic", 10}, {"Reg", 3}, {"Regular", 7}, @@ -167,20 +167,19 @@ const struct CODEPAGE_MAP { }; int CompareFontFamilyString(const void* key, const void* element) { - CFX_ByteString str_key((const FX_CHAR*)key); + CFX_ByteString str_key((const char*)key); const AltFontFamily* family = reinterpret_cast(element); if (str_key.Find(family->m_pFontName) != -1) return 0; - return FXSYS_stricmp(reinterpret_cast(key), - family->m_pFontName); + return FXSYS_stricmp(reinterpret_cast(key), family->m_pFontName); } int CompareString(const void* key, const void* element) { - return FXSYS_stricmp(reinterpret_cast(key), + return FXSYS_stricmp(reinterpret_cast(key), reinterpret_cast(element)->m_pName); } -CFX_ByteString TT_NormalizeName(const FX_CHAR* family) { +CFX_ByteString TT_NormalizeName(const char* family) { CFX_ByteString norm(family); norm.Remove(' '); norm.Remove('-'); @@ -223,7 +222,7 @@ CFX_ByteString GetFontFamily(CFX_ByteString fontName, int nStyle) { return found ? CFX_ByteString(found->m_pFontFamily) : fontName; } -CFX_ByteString ParseStyle(const FX_CHAR* pStyle, int iLen, int iIndex) { +CFX_ByteString ParseStyle(const char* pStyle, int iLen, int iIndex) { CFX_ByteTextBuf buf; if (!iLen || iLen <= iIndex) return buf.MakeString(); @@ -505,7 +504,7 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const CFX_ByteString& name, } if (!style.IsEmpty()) { int nLen = style.GetLength(); - const FX_CHAR* pStyle = style.c_str(); + const char* pStyle = style.c_str(); int i = 0; bool bFirstItem = true; CFX_ByteString buf; -- cgit v1.2.3