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.
Do you need to work with PDF Files in Java?
|Try JPedal - Our Enhanced Document Viewing, Printing and Extracting Solution|