You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2023/12/06 15:56:33 UTC
svn commit: r1914389 - /pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/ttf/TTFSubsetter.java
Author: tilman
Date: Wed Dec 6 15:56:33 2023
New Revision: 1914389
URL: http://svn.apache.org/viewvc?rev=1914389&view=rev
Log:
PDFBOX-5728: check whether there are any glyph names in the POST table
Modified:
pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/ttf/TTFSubsetter.java
Modified: pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/ttf/TTFSubsetter.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/ttf/TTFSubsetter.java?rev=1914389&r1=1914388&r2=1914389&view=diff
==============================================================================
--- pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/ttf/TTFSubsetter.java (original)
+++ pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/ttf/TTFSubsetter.java Wed Dec 6 15:56:33 2023
@@ -810,7 +810,8 @@ public final class TTFSubsetter
private byte[] buildPostTable() throws IOException
{
PostScriptTable post = ttf.getPostScript();
- if (post == null || keepTables != null && !keepTables.contains("post"))
+ if (post == null || post.getGlyphNames() == null ||
+ keepTables != null && !keepTables.contains("post"))
{
return null;
}