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

John Hewson commented on PDFBOX-2565:
-------------------------------------

I cleaned up TTFSubsetter and have implemented subsetting for 
Type0/CIDFontType2 fonts - i.e. TrueType fonts. The file size of 
the"EmbededFonts" example has now been reduced form  217KB to 11KB.

It's worth pointing out the PDFBox's APIs were designed for parsing and 
modifying PDFs, but are not ideal for creating PDFs from scratch when the 
subsetting of fonts is involved. We always require a PDFont to be valid and 
usable: the font embedding procedure therefore occurs twice, once for the 
initial full font, and once for the subset. While seemingly wasteful, this 
doesn't really add a significant overhead and avoids a drastic upheaval of the 
font APIs.

> Subset embedded TTF fonts
> -------------------------
>
>                 Key: PDFBOX-2565
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2565
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: PDModel
>    Affects Versions: 2.0.0
>            Reporter: John Hewson
>            Assignee: John Hewson
>             Fix For: 2.0.0
>
>
> Now that PDFBOX-922 is fixed, we have working TTF embedding. However, the 
> entire font is embedded, which is rather large. We already have a 
> TTFSubsetter class in FontBox, which is never used, so we should make use of 
> it.



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

Reply via email to