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

John Hewson edited comment on PDFBOX-3098 at 11/11/15 6:30 PM:
---------------------------------------------------------------

TTF fonts embedded in PDF don't have the same set of required tables as 
standalone fonts. In fact, it's possible for the PDF file to specify an 
encoding for the font which maps the same Unicode character to different 
glyphs, which isn't something that's possible with a cmap table. So in the 
general case, creating a default cmap table doesn't work.

There's also the issue of other missing tables such as OS/2, unless the PDF 
file embeds ascender and descender information, we can't recreate those 
accurately. 


was (Author: jahewson):
That's correct. You're expecting an OTF font, which is a CFF font with an SFNT 
wrapper. However, PDF supports "bare" CFF fonts, which is just the CFF data 
without an SFNT wrapper. The file extension for these is .cff and they can be 
opened with FontForge, but few other tools.

> getFontFile2() doesn't extract a valid font file for CID Type 2 fonts
> ---------------------------------------------------------------------
>
>                 Key: PDFBOX-3098
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3098
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: FontBox
>    Affects Versions: 2.0.0
>         Environment: Windows 10
>            Reporter: Ch. Schlatter
>
> I tried to extract an CID Type 2 font (proceed as described in the 
> ExtractTTFFonts.java example). It seems that the extracted font isn't valid 
> due the missing cmap table. Maybe it's possible to add an default table?



--
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