[ https://issues.apache.org/jira/browse/FOP-2699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16097831#comment-16097831 ]
Kazuyuki Murakami edited comment on FOP-2699 at 7/24/17 9:09 AM: ----------------------------------------------------------------- createCFF {code:java} //Charset table int charsetOffset = currentPos; writeCharsetTable(cffReader.getFDSelect() != null); //FDSelect table int fdSelectOffset = currentPos; if (cffReader.getFDSelect() != null) { writeFDSelect(); } //Char Strings Index int charStringOffset = currentPos; writeIndex(subsetCharStringsIndex); {code} in "Morisawa Ryumin", (original -> subset) charsetOffset = 25842 -> 20572 fdSelectOffset = 25847 -> 20577 charStringOffset = 26272 -> 35964 writeFDSelect() has problem?? was (Author: murak...@brainsellers.com): updateFixedOffsets {code:java} //Char string index offset in the private dict DICTEntry charString = topDICT.get("CharStrings"); int oldCharStringOffset = dataTopDictOffset + charString.getOffset(); updateOffset(output, oldCharStringOffset, charString.getOperandLength(), charStringOffset); {code} in "Morisawa Ryumin", oldCharStringOffset = 98 charString.getOperandLength() = 3 charStringOffset = 35964 I suspected that there was a problem with a specific glyph, I attempted to identify it, but I could not do it. Is the number of glyphs to be subset affected? > Acrobat Reader error with Morisawa Fonts > ---------------------------------------- > > Key: FOP-2699 > URL: https://issues.apache.org/jira/browse/FOP-2699 > Project: FOP > Issue Type: Bug > Components: font/opentype > Affects Versions: trunk > Environment: Operating Systems: Windows > JDK: 1.8 > OpenFont: Morisawa ShinGo Pro R > Reporter: Kazuyuki Murakami > Attachments: fop.xconf, test.fo, test_full.pdf, test_subset.pdf, > workaround.patch > > > The Morisawa ShinGo Pro R font cannot be embedded into PDF document. > How to repeat > 1. Get FOP from trunk@1786161 > 2. Get Font from > https://github.com/skyavy-cebu/DoubleClick/blob/master/web/fonts/A-OTF-ShinGoPro-Regular.otf?raw=true > 3. Use my config file and generate the PDF, there is no error reported. > 4. Open the PDF file in Acro-Reader, it will report the "cannot extract the > embedded font" error. > Notes: > I can display normally with full embedding. > (Please refer to test.fo, test_subset.pdf, test_full.pdf) > When examining the subset font with CFFParser, the following Exception > occurred. > java.io.EOFException > at org.apache.fontbox.cff.DataInput.readUnsignedShort(DataInput.java:151) > at org.apache.fontbox.cff.CFFDataInput.readCard16(CFFDataInput.java:55) > at org.apache.fontbox.cff.CFFParser.readIndexDataOffsets(CFFParser.java:172) > at org.apache.fontbox.cff.CFFParser.readIndexData(CFFParser.java:193) > at org.apache.fontbox.cff.CFFParser.parseCIDFontDicts(CFFParser.java:590) > at org.apache.fontbox.cff.CFFParser.parseFont(CFFParser.java:503) > at org.apache.fontbox.cff.CFFParser.parse(CFFParser.java:141) -- This message was sent by Atlassian JIRA (v6.4.14#64029)