Font.createFont leaves ttf files in /var/tmp

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 1.3.0
    • Component/s: client-libs
    • None
    • 2d
    • sparc
    • solaris_8

      Font.createFont creates temporary files in /var/tmp and does not clean them up. This eventually leads to filling the device. The following source shows this:

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

      public class FontTest
      {
          public static void main(String [] args)
          {
              File file = new File("/usr/openwin/lib/X11/fonts/TrueType/Arial.ttf");
              try
              {
                  FileInputStream in = new FileInputStream(file);
                  Font arial = Font.createFont(Font.TRUETYPE_FONT, in);
              }catch(Exception e) { e.printStackTrace(); }
          }
      }

      % javac FontTest
      % ls /var/tmp/*.ttf
      ls: No match.
      % java FontTest
      % !ls
      ls /var/tmp/*.ttf
      /var/tmp/font9432.ttf
      % java FontTest
      % !ls
      ls /var/tmp/*.ttf
      /var/tmp/font37475.ttf /var/tmp/font9432.ttf

            Assignee:
            Unassigned
            Reporter:
            J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: