We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10facb6 commit 3f05017Copy full SHA for 3f05017
1 file changed
pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/TrueTypeEmbedder.java
@@ -22,6 +22,7 @@
22
import java.io.ByteArrayOutputStream;
23
import java.io.IOException;
24
import java.io.InputStream;
25
+import java.nio.charset.StandardCharsets;
26
import java.util.ArrayList;
27
import java.util.HashSet;
28
import java.util.List;
@@ -87,7 +88,7 @@ abstract class TrueTypeEmbedder implements Subsetter
87
88
InputStream is = ttf.getOriginalData();
89
byte[] b = new byte[4];
90
is.mark(b.length);
- if (is.read(b) == b.length && new String(b).equals("ttcf"))
91
+ if (is.read(b) == b.length && new String(b, StandardCharsets.US_ASCII).equals("ttcf"))
92
{
93
is.close();
94
throw new IOException("Full embedding of TrueType font collections not supported");
0 commit comments