--- old/modules/graphics/src/main/java/com/sun/javafx/font/directwrite/DWFontFile.java 2016-05-05 11:06:13.786799416 -0700 +++ new/modules/graphics/src/main/java/com/sun/javafx/font/directwrite/DWFontFile.java 2016-05-05 11:06:13.638799418 -0700 @@ -141,4 +141,20 @@ int aaMode, FontStrikeDesc desc) { return new DWFontStrike(this, size, transform, aaMode, desc); } + + /* This is called only for fonts where a temp file was created + */ + @Override + protected synchronized void disposeOnShutdown() { + if (fontFace != null) { + //If this isn't done, Windows won't delete the file, since + // DW will have it open. + fontFace.Release(); + if (PrismFontFactory.debugFonts) { + System.err.println("fontFace freed: " + fontFace); + } + fontFace = null; + } + super.disposeOnShutdown(); // deletes the file. + } }