Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 19 additions & 8 deletions src/v2/pdf_resources/page_font.h
Original file line number Diff line number Diff line change
Expand Up @@ -387,12 +387,12 @@ namespace pdflib
}
else
{
LOG_S(WARNING) << "could not decode character with value=" << c
LOG_S(ERROR) << "could not decode character with value=" << c
<< " for encoding=" << to_string(encoding)
<< ", fontname=" << font_name
<< " and subtype=" << subtype;

result = "glyph<c="+std::to_string(c)+",font="+font_name+">";
result = "GLYPH<c="+std::to_string(c)+",font="+font_name+">";
}

return result;
Expand Down Expand Up @@ -429,11 +429,11 @@ namespace pdflib
}
else
{
LOG_S(WARNING) << "could not decode character with value=" << c
LOG_S(ERROR) << "could not decode character with value=" << c
<< " for encoding=" << to_string(encoding)
<< ", fontname=" << font_name
<< " and subtype=" << subtype;
return "glyph<c="+std::to_string(c)+",font="+font_name+">";
return "GLYPH<c="+std::to_string(c)+",font="+font_name+">";
}
}
break;
Expand All @@ -445,7 +445,7 @@ namespace pdflib
<< ", fontname=" << font_name
<< " and subtype=" << subtype;

return std::string("glyph<UNKNOWN>");
return std::string("GLYPH<UNKNOWN>");
}
}
}
Expand Down Expand Up @@ -503,6 +503,7 @@ namespace pdflib
}
else
{
/*
std::string notdef="GLYPH<"+std::to_string(c)+">";

unknown_numbs[c] += 1;
Expand All @@ -513,6 +514,14 @@ namespace pdflib
<< " (corresponding font: " << fontname << ")";

return notdef;
*/

LOG_S(WARNING) << " Symbol not found in special font: " << c
<< "; Encoding: " << to_string(encoding)
<< "; font-name: " << font_name
<< " (corresponding font: " << fontname << ")";

return get_character_from_encoding(c);
}
}
else
Expand Down Expand Up @@ -1546,10 +1555,12 @@ namespace pdflib
if(cmap_initialized) // we found a `ToUnicode` before. No need to go deeper!
{
LOG_S(WARNING) << "We found a `ToUnicode` before. No need to go deeper!";
return;
// return;
}
else if(subtype==TYPE_0 and desc_font!=NULL and
cids.has(encoding_name) )
//else

if(subtype==TYPE_0 and desc_font!=NULL and
cids.has(encoding_name) )
{
try
{
Expand Down
4 changes: 2 additions & 2 deletions src/v2/pdf_resources/page_font/font_cid.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,8 @@ namespace pdflib
}
else
{
LOG_S(WARNING) << "ignoring cid: " << cid << "\tname: " << name;
cid2utf8[cid] = "glyph<cid:"+std::to_string(cid)+">";
LOG_S(ERROR) << "ignoring cid: " << cid << "\tname: " << name;
cid2utf8[cid] = "GLYPH<cid:"+std::to_string(cid)+">";
}
}
}
Expand Down
Loading
Loading