This is something very weird and I am sure I am doing something wrong, but I don't know what.
I have a few OTF files on src/main/resources/report/fonts. These files are correct and work fine, but when I compile the application, they are modified (the size of the files increases 2x) and they are not valid anymore.
I am using Apache FOP and I get the following errors:
2014-05-27 11:34:30,145 [JavaFX Application Thread] ERROR org.apache.fop.fonts.truetype.TTFFile - Dirtab head not found.
2014-05-27 11:34:30,145 [JavaFX Application Thread] ERROR org.apache.fop.fonts.truetype.TTFFile - Dirtab maxp not found.
2014-05-27 11:34:30,145 [JavaFX Application Thread] ERROR org.apache.fop.fonts.truetype.TTFFile - Dirtab hhea not found.
2014-05-27 11:34:30,145 [JavaFX Application Thread] ERROR org.apache.fop.fonts.truetype.TTFFile - Dirtab hmtx not found
Now, if I, mannually change the fonts for the original files, everything works like a charm.
What is wrong? I have other files on the same folder and they are not modified.
UPDATE
This is how I am loading it, but I don't think the loading is the problem because, if I change the files for the original ones, it works.
fopFactory.getFontManager().setFontBaseURL(getClass().getClassLoader().getResource("report/").toString().replace(":/", ":///"))