JDK-4469874 : Font.createFont not always delete temp font files
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 1.4.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2001-06-14
  • Updated: 2001-06-14
  • Resolved: 2001-06-14
Related Reports
Duplicate :  
Description
ingrid.yao@Eng 2001-06-14

For general cases, the bug 4310747 did get fixed, ie. the temp font files 
were deleted from temp diretory, but it is not always true for all the cases.

J2SE Version (please include all output from java -version flag):
 java version "1.4.0-beta"
 Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b65)
 Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode)

Does this problem occur on J2SE 1.3?  Yes / No (pick one)

  No.

Bug Description:

    One CAP member sees the temporary file created by createFont()
    not getting removed in their apps. I can only reproduce the problem
    within their apps not the small test cases. 

    And they suspect the problem is happening because their application
    is actually doing something with the font and not just loading
    then deleting it. If you add "Font derived = fnt.deriveFont(20)"
    into small test case, they saw the problem happened intermittently.


Step to reproduces the problem
-------------------------------
1> small test program:

   import java.awt.*;
   import java.io.*;

   public class FontTest{
        private static String name;
        public FontTest() {
                try {
                        FileInputStream fis = new FileInputStream(name);
                        Font fnt = Font.createFont(Font.TRUETYPE_FONT,fis);
                        System.out.println("font is " +fnt);
                } catch(Exception ex) {
                        ex.printStackTrace(); }

        }
        public static void main(String[] args) {
                name = args[0];
                FontTest a = new FontTest();
        }
    }

2> customer's apps:
Bring up their apps through http://nis.diwan.com/koran.html.
Just click on the link called 'Quran Application' at the bottom
of this page and WebStart should do the rest. The application loads
its font on start up and the font is still in the temp folder when
it quits.