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

John Hewson commented on PDFBOX-2360:
-------------------------------------

{quote}
We are using the API for font subsetting and font merging:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/OTFFile.java?view=markup
{quote}

Looking at the code I see you're embedding CFF fonts. This is probably where 
the biggest API changes have been. The reason is that the old FontBox API 
conflated two different kinds of font, CIDFonts and Type 1-equivalent fonts, 
both of which can be represented as a CFF. Any code using the old API is 
guaranteed to be buggy in fairly major ways.

These two fonts types work in very different manners, Type 1-equivalent fonts 
have an encoding which maps PostScript names to glyphs. CIDFonts do not have 
any encoding and use CIDs to index glyphs numerically. The new APIs in 2.0 
reflect this, and CFFont has been split into two subclasses CFFType1Font and 
CFFCIDFont, one with a name-based API and the other with a CID-based API.

> PDFont had methods removed
> --------------------------
>
>                 Key: PDFBOX-2360
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2360
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 2.0.0
>            Reporter: simon steiner
>
> Add back methods or provide a equivalent to pdfbox so it easier to upgrade to 
> PDFBox 2
> PDFont
> public int getFirstChar()
> public int getLastChar()
> public Encoding getFontEncoding()
> public CMap getToUnicodeCMap()
> public String encode(byte[] c, int offset, int length) throws IOException
> PDCIDFont
> public long getDefaultWidth()
> Encoding
> public String getCharacter(int code) throws IOException
> CFFFont
> public Object getProperty(String name)
> public Map<String, byte[]> getCharStringsDict()
> public CFFEncoding getEncoding()
> CFFCharset
> public List<Entry> getEntries()
> CFFEncoding
> public List<Entry> getEntries()
> Cmap
> public String lookup( int code, int length )



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

Reply via email to