diff options
Diffstat (limited to 'core/fpdfapi/font/cpdf_cidfont.cpp')
-rw-r--r-- | core/fpdfapi/font/cpdf_cidfont.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/core/fpdfapi/font/cpdf_cidfont.cpp b/core/fpdfapi/font/cpdf_cidfont.cpp index b0ae05c8c5..6e050c4bc7 100644 --- a/core/fpdfapi/font/cpdf_cidfont.cpp +++ b/core/fpdfapi/font/cpdf_cidfont.cpp @@ -136,9 +136,9 @@ bool IsValidEmbeddedCharcodeFromUnicodeCharset(CIDSet charset) { } } -FX_WCHAR EmbeddedUnicodeFromCharcode(const FXCMAP_CMap* pEmbedMap, - CIDSet charset, - uint32_t charcode) { +wchar_t EmbeddedUnicodeFromCharcode(const FXCMAP_CMap* pEmbedMap, + CIDSet charset, + uint32_t charcode) { if (!IsValidEmbeddedCharcodeFromUnicodeCharset(charset)) return 0; @@ -151,7 +151,7 @@ FX_WCHAR EmbeddedUnicodeFromCharcode(const FXCMAP_CMap* pEmbedMap, uint32_t EmbeddedCharcodeFromUnicode(const FXCMAP_CMap* pEmbedMap, CIDSet charset, - FX_WCHAR unicode) { + wchar_t unicode) { if (!IsValidEmbeddedCharcodeFromUnicodeCharset(charset)) return 0; @@ -239,15 +239,15 @@ CFX_WideString CPDF_CIDFont::UnicodeFromCharCode(uint32_t charcode) const { CFX_WideString str = CPDF_Font::UnicodeFromCharCode(charcode); if (!str.IsEmpty()) return str; - FX_WCHAR ret = GetUnicodeFromCharCode(charcode); + wchar_t ret = GetUnicodeFromCharCode(charcode); return ret ? ret : CFX_WideString(); } -FX_WCHAR CPDF_CIDFont::GetUnicodeFromCharCode(uint32_t charcode) const { +wchar_t CPDF_CIDFont::GetUnicodeFromCharCode(uint32_t charcode) const { switch (m_pCMap->m_Coding) { case CIDCODING_UCS2: case CIDCODING_UTF16: - return static_cast<FX_WCHAR>(charcode); + return static_cast<wchar_t>(charcode); case CIDCODING_CID: if (!m_pCID2UnicodeMap || !m_pCID2UnicodeMap->IsLoaded()) return 0; @@ -257,15 +257,15 @@ FX_WCHAR CPDF_CIDFont::GetUnicodeFromCharCode(uint32_t charcode) const { return m_pCID2UnicodeMap->UnicodeFromCID(CIDFromCharCode(charcode)); #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ - FX_WCHAR unicode; + wchar_t unicode; int charsize = 1; if (charcode > 255) { charcode = (charcode % 256) * 256 + (charcode / 256); charsize = 2; } - int ret = FXSYS_MultiByteToWideChar( - g_CharsetCPs[m_pCMap->m_Coding], 0, - reinterpret_cast<const FX_CHAR*>(&charcode), charsize, &unicode, 1); + int ret = FXSYS_MultiByteToWideChar(g_CharsetCPs[m_pCMap->m_Coding], 0, + reinterpret_cast<const char*>(&charcode), + charsize, &unicode, 1); return ret == 1 ? unicode : 0; #else if (!m_pCMap->m_pEmbedMap) @@ -275,7 +275,7 @@ FX_WCHAR CPDF_CIDFont::GetUnicodeFromCharCode(uint32_t charcode) const { #endif } -uint32_t CPDF_CIDFont::CharCodeFromUnicode(FX_WCHAR unicode) const { +uint32_t CPDF_CIDFont::CharCodeFromUnicode(wchar_t unicode) const { uint32_t charcode = CPDF_Font::CharCodeFromUnicode(unicode); if (charcode) return charcode; @@ -290,7 +290,7 @@ uint32_t CPDF_CIDFont::CharCodeFromUnicode(FX_WCHAR unicode) const { return 0; uint32_t CID = 0; while (CID < 65536) { - FX_WCHAR this_unicode = + wchar_t this_unicode = m_pCID2UnicodeMap->UnicodeFromCID(static_cast<uint16_t>(CID)); if (this_unicode == unicode) return CID; @@ -611,7 +611,7 @@ int CPDF_CIDFont::GlyphFromCharCode(uint32_t charcode, bool* pVertGlyph) { if (!m_pFontFile && !m_pStreamAcc) { uint16_t cid = CIDFromCharCode(charcode); - FX_WCHAR unicode = 0; + wchar_t unicode = 0; if (m_bCIDIsGID) { #if _FXM_PLATFORM_ != _FXM_PLATFORM_APPLE_ return cid; @@ -649,7 +649,7 @@ int CPDF_CIDFont::GlyphFromCharCode(uint32_t charcode, bool* pVertGlyph) { iBaseEncoding = PDFFONT_ENCODING_WINANSI; else if (bMacRoman) iBaseEncoding = PDFFONT_ENCODING_MACROMAN; - const FX_CHAR* name = GetAdobeCharName( + const char* name = GetAdobeCharName( iBaseEncoding, std::vector<CFX_ByteString>(), charcode); if (!name) return charcode ? static_cast<int>(charcode) : -1; @@ -693,16 +693,16 @@ int CPDF_CIDFont::GlyphFromCharCode(uint32_t charcode, bool* pVertGlyph) { for (i = 0; i < FXFT_Get_Face_CharmapCount(face); i++) { uint32_t ret = FT_CharCodeFromUnicode( FXFT_Get_Charmap_Encoding(FXFT_Get_Face_Charmaps(face)[i]), - static_cast<FX_WCHAR>(charcode)); + static_cast<wchar_t>(charcode)); if (ret == 0) continue; FXFT_Set_Charmap(face, FXFT_Get_Face_Charmaps(face)[i]); - unicode = static_cast<FX_WCHAR>(ret); + unicode = static_cast<wchar_t>(ret); break; } if (i == FXFT_Get_Face_CharmapCount(face) && i) { FXFT_Set_Charmap(face, FXFT_Get_Face_Charmaps(face)[0]); - unicode = static_cast<FX_WCHAR>(charcode); + unicode = static_cast<wchar_t>(charcode); } } if (FXFT_Get_Face_Charmap(face)) { @@ -744,7 +744,7 @@ int CPDF_CIDFont::GlyphFromCharCode(uint32_t charcode, bool* pVertGlyph) { return pdata[0] * 256 + pdata[1]; } -uint32_t CPDF_CIDFont::GetNextChar(const FX_CHAR* pString, +uint32_t CPDF_CIDFont::GetNextChar(const char* pString, int nStrLen, int& offset) const { return m_pCMap->GetNextChar(pString, nStrLen, offset); @@ -754,11 +754,11 @@ int CPDF_CIDFont::GetCharSize(uint32_t charcode) const { return m_pCMap->GetCharSize(charcode); } -int CPDF_CIDFont::CountChar(const FX_CHAR* pString, int size) const { +int CPDF_CIDFont::CountChar(const char* pString, int size) const { return m_pCMap->CountChar(pString, size); } -int CPDF_CIDFont::AppendChar(FX_CHAR* str, uint32_t charcode) const { +int CPDF_CIDFont::AppendChar(char* str, uint32_t charcode) const { return m_pCMap->AppendChar(str, charcode); } |