summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_font
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/fpdf_font')
-rw-r--r--core/fpdfapi/fpdf_font/cpdf_font.cpp2
-rw-r--r--core/fpdfapi/fpdf_font/cpdf_type3font.cpp3
-rw-r--r--core/fpdfapi/fpdf_font/fpdf_font_cid.cpp4
3 files changed, 5 insertions, 4 deletions
diff --git a/core/fpdfapi/fpdf_font/cpdf_font.cpp b/core/fpdfapi/fpdf_font/cpdf_font.cpp
index 7a6043ad87..3dfadeda9e 100644
--- a/core/fpdfapi/fpdf_font/cpdf_font.cpp
+++ b/core/fpdfapi/fpdf_font/cpdf_font.cpp
@@ -485,7 +485,7 @@ const FX_CHAR* CPDF_Font::GetAdobeCharName(int iBaseEncoding,
const FX_CHAR* name = nullptr;
if (pCharNames)
- name = pCharNames[charcode];
+ name = pCharNames[charcode].c_str();
if ((!name || name[0] == 0) && iBaseEncoding)
name = PDF_CharNameFromPredefinedCharSet(iBaseEncoding, charcode);
return name && name[0] ? name : nullptr;
diff --git a/core/fpdfapi/fpdf_font/cpdf_type3font.cpp b/core/fpdfapi/fpdf_font/cpdf_type3font.cpp
index 92f5102cdb..40fb54fbc7 100644
--- a/core/fpdfapi/fpdf_font/cpdf_type3font.cpp
+++ b/core/fpdfapi/fpdf_font/cpdf_type3font.cpp
@@ -73,7 +73,8 @@ FX_BOOL CPDF_Type3Font::Load() {
LoadPDFEncoding(pEncoding, m_BaseEncoding, m_pCharNames, FALSE, FALSE);
if (m_pCharNames) {
for (int i = 0; i < 256; i++) {
- m_Encoding.m_Unicodes[i] = PDF_UnicodeFromAdobeName(m_pCharNames[i]);
+ m_Encoding.m_Unicodes[i] =
+ PDF_UnicodeFromAdobeName(m_pCharNames[i].c_str());
if (m_Encoding.m_Unicodes[i] == 0) {
m_Encoding.m_Unicodes[i] = i;
}
diff --git a/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp b/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp
index da6b8de35b..f84fa9f2f9 100644
--- a/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp
+++ b/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp
@@ -304,7 +304,7 @@ CPDF_CMap* CPDF_CMapManager::GetPredefinedCMap(const CFX_ByteString& name,
CPDF_CMap* CPDF_CMapManager::LoadPredefinedCMap(const CFX_ByteString& name,
FX_BOOL bPromptCJK) {
CPDF_CMap* pCMap = new CPDF_CMap;
- const FX_CHAR* pname = name;
+ const FX_CHAR* pname = name.c_str();
if (*pname == '/') {
pname++;
}
@@ -315,7 +315,7 @@ CPDF_CMap* CPDF_CMapManager::LoadPredefinedCMap(const CFX_ByteString& name,
void CPDF_CMapManager::ReloadAll() {
for (const auto& pair : m_CMaps) {
CPDF_CMap* pCMap = pair.second;
- pCMap->LoadPredefined(this, pair.first, FALSE);
+ pCMap->LoadPredefined(this, pair.first.c_str(), FALSE);
}
for (size_t i = 0; i < FX_ArraySize(m_CID2UnicodeMaps); ++i) {
if (CPDF_CID2UnicodeMap* pMap = m_CID2UnicodeMaps[i]) {