Skip to content

Commit

Permalink
PDFBOX-5384: use workaround from PDF.js
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1922164 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
THausherr committed Nov 27, 2024
1 parent daba47a commit dbcf6d2
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,13 @@ private CMap loadUnicodeCmap()
cmap = readCMap(toUnicode);
if (cmap != null && !cmap.hasUnicodeMappings())
{
LOG.warn("Invalid ToUnicode CMap in font {}", getName());
String name = getName();
LOG.warn("Invalid ToUnicode CMap in font {}", name);
if (name != null && (name.startsWith("Tahoma") || name.startsWith("Verdana")))
{
// PDFBOX-5384: workaround inspired by PDF.js 15719 and 11242
return null;
}
String cmapName = cmap.getName() != null ? cmap.getName() : "";
String ordering = cmap.getOrdering() != null ? cmap.getOrdering() : "";
COSName encoding = dict.getCOSName(COSName.ENCODING);
Expand Down

0 comments on commit dbcf6d2

Please sign in to comment.