[ 
https://issues.apache.org/jira/browse/PDFBOX-5071?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tilman Hausherr updated PDFBOX-5071:
------------------------------------
    Summary: OTF font cannot be embeded as subset  (was: OFT font cannot be 
embeded as subset)

> OTF font cannot be embeded as subset
> ------------------------------------
>
>                 Key: PDFBOX-5071
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5071
>             Project: PDFBox
>          Issue Type: Bug
>          Components: FontBox
>    Affects Versions: 2.0.19
>         Environment: Mac OS Mojave
> Java 1.8.151
> PDFBox 2.0.19
>            Reporter: Thiago T
>            Priority: Major
>         Attachments: SamplePDFService.java
>
>
> When trying to generate an PDF with a OTF font (NotoSans), it doesnt allow to 
> embed the subset.
> Font location: 
> [https://github.com/googlefonts/noto-cjk/blob/master/NotoSansCJKsc-Regular.otf]
>  
>  
> {code:java}
> OTFParser otfParser = new OTFParser();
> OpenTypeFont otf = otfParser.parse(new File(fontPath));
> return PDType0Font.load(doc, otf, false); //using true throws an exception.
> {code}
>  
> If you set it to false it generates a huge file (14mb), even if just two 
> glyphs are being selected.
> The code attached demonstrates the problem.
> If something is not correctly being used with this OTF file, please add a 
> comment, as I couldnt find a way to make it work with that font without 
> creating a unnecessary large file



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to