[ 
https://issues.apache.org/jira/browse/PDFBOX-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15355628#comment-15355628
 ] 

Tilman Hausherr commented on PDFBOX-3162:
-----------------------------------------

I had another look at this... it was changed (by me) in PDFBOX-2854. When the 
subsetter is called without the 2nd parameter or with null as the second 
parameter, the creation of the os2 table and (if we skip os2) the cmap table 
would fail.

In a real life situation (the subsetter is called with selected tables), it is 
not a problem to have an empty subset.

[~ssteiner1] you created PDFBOX-2854. Would it be OK for you if the subsetter 
goes ahead without creating the os2 and cmap tables when the subset is empty?

> IllegalStateException in TTFSubsetter
> -------------------------------------
>
>                 Key: PDFBOX-3162
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3162
>             Project: PDFBox
>          Issue Type: Bug
>          Components: FontBox
>    Affects Versions: 2.0.0
>         Environment: 2.0.0-RC2
>            Reporter: Philip Helger
>            Assignee: Andreas Lehmkühler
>         Attachments: OpenSans-Bold.ttf, OpenSans-Regular.ttf, 
> variables-on-error.png
>
>
> Hi encountered a rare exception with an empty TTF subset:
> {code}
> ==> [1] caused by java.lang.IllegalStateException: subset is empty
> 1.: org.apache.fontbox.ttf.TTFSubsetter.writeToStream(TTFSubsetter.java:921)
> 2.: 
> org.apache.pdfbox.pdmodel.font.TrueTypeEmbedder.subset(TrueTypeEmbedder.java:304)
> 3.: org.apache.pdfbox.pdmodel.font.PDType0Font.subset(PDType0Font.java:162)
> 4.: org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1102)
> 5.: com.helger.pdflayout.PageLayoutPDF.renderTo(PageLayoutPDF.java:276)
> {code}
> Unfortunately I don't know yet what was causing the problem, but I will 
> provide you with more details on Monday (if necessary).
> If there is nothing to subset - I think the call should simply be ignored???
> Or maybe this is a problem because of the "uni" name bug (in 2.0.0-RC2) I 
> reopened lately?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org

Reply via email to