One of the things we do in our PDF library is to scan the Font directories (ie C:/win and /Library/fonts) for any TrueType or OpenType fonts to use in our PDF viewer. On the Mac, this contains some ‘interesting’ files.
When we switched over to Java 7, they started to show this error in our code….
java.io.FileNotFoundException: /Library/Fonts/������������������������ ProN W4.otf (No such file or directory)
at java.io.FileInputStream.open(Native Method)
We can easily trap this by checking the file exists first with
new File(fontPath + currentFont).exists()
but it is a definite change in the way the File function works. Have you found any similar ‘changes’?
This post is part of our “Fonts Articles Index” in these articles we explore Fonts.
IDRsolutions develop a Java PDF library, a PDF forms to HTML5 converter, a PDF to HTML5 or SVG converter and a Java Image Library that doubles as an ImageIO replacement. On the blog our team post about anything interesting they learn about.