Problem: You get: [Fatal Error] msmincho.xml:1:171: Character reference "�" is an invalid XML character if you make font metrics files from msmincho.ttc and msgothic.ttc of Windows and use them. To reproduce it, set up the attached file: fopdoc.zip as c:\fopdoc, fop.xconf.xml(one of the zip) as ${fop.home}/conf/fop.xconf.xml, and run ant as follows: c:\fopdoc>ant For your convenience, I included ant's error message as err.txt in the attached file: fopdoc.zip. Solution: I found something in "public final String readTTFString(int len)" of org.apache.fop.fonts.truetype.FontFileReader. When I replaced the character encoding discerning heuristic: final String encoding; if ((tmp.length > 0) && (tmp[0] == 0)) { encoding = "UTF-16BE"; } else { encoding = "ISO-8859-1"; } with the following: String encoding = "ISO-8859-1"; for(int c: tmp) { c &= 0xff; if(c==0 || c >= 0x80) { encoding = "UTF-16BE"; break; } } everything went fine.
Created attachment 23073 [details] Reproducing environment and error message
resetting P2 open bugs to P3 pending further review
I've encountered the same problem with fop 0.95 but with the Chinese arphic fonts on Ubuntu. If I take the submitter's example files, adapt them for Ubuntu and run them on Ubuntu with 0.95, I get the same error. (Note here that the "adaptation" does not change the font files used. I just had the build.xml file point to the Windows files on my Windows partition.) However, if I upgrade to 1.0 and run the same test, then I do not get the error reported by the submitter. I also do not get the error I experienced with the Chinese arphic fonts on Ubuntu. So it seems this error has been fixed in 1.0.