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

Robert Meyer commented on FOP-850:
----------------------------------

As I am looking at fonts at the moment, I thought I would take a quick look at 
this. This issue seems to have been resolved as it no longer complains with the 
provided font. Also, looking in the code, it appears cmap encoding is being 
handled for both values 0 and 1:

            if (cmapPID == 3 && cmapEID == 1) {
                cmapUniOffset = cmapOffset;
            }
            if (cmapPID == 3 && cmapEID == 0) {
                symbolMapOffset = cmapOffset;
            }

This was added back in 2009. I would therefore recommend this issue be closed.
                
> TTF Reader fails
> ----------------
>
>                 Key: FOP-850
>                 URL: https://issues.apache.org/jira/browse/FOP-850
>             Project: Fop
>          Issue Type: Bug
>          Components: general
>    Affects Versions: 0.20.5
>         Environment: Operating System: All
> Platform: PC
>            Reporter: Peter Schäfer
>         Attachments: BERLIN.TTF
>
>
> Reading fonts/BERLIN.TTF...
> Number of glyphs in font: 119
> Unicode cmap table not present
> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
>         at java.util.ArrayList.RangeCheck(ArrayList.java:507)
>         at java.util.ArrayList.get(ArrayList.java:324)
>         at org.apache.fop.fonts.TTFFile.createCMaps(TTFFile.java:449)
>         at org.apache.fop.fonts.TTFFile.readFont(TTFFile.java:439)
>         at org.apache.fop.fonts.apps.TTFReader.loadTTF(TTFReader.java:222)
>         at org.apache.fop.fonts.apps.TTFReader.main(TTFReader.java:184)
> I found that the TrueType file contains a "cmap" table with platformID=3 and
> encodingId=0 (Windows Symbol encoding, or whatever).
> TTFReader expects encodingId = 1. However, the table contains readable data in
> the correct format (format 4). After patching TTFFile.java, it created a
> perfectly valid metrics file.
> I might suggest that you apply this patch to org.apache.fop.fonts.TTFFile, 
> line 185:
>    if (cmap_pid == 3 && (cmap_eid == 1 || cmap_eid == 0))

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to