6870238: Font2DTest fails on Debian after FontManager refactoring
authorrkennke
Wed, 12 Aug 2009 17:21:08 +0200
changeset 3930 738bc2599ca8
parent 3929 de1a48b7aa41
child 3931 81071c37cc91
6870238: Font2DTest fails on Debian after FontManager refactoring Summary: Use fontManager field instead of querying the FontManagerFactory Reviewed-by: igor, prr
jdk/src/solaris/classes/sun/font/FcFontConfiguration.java
--- a/jdk/src/solaris/classes/sun/font/FcFontConfiguration.java	Fri Aug 07 19:36:28 2009 +0200
+++ b/jdk/src/solaris/classes/sun/font/FcFontConfiguration.java	Wed Aug 12 17:21:08 2009 +0200
@@ -90,7 +90,7 @@
 
         setFontConfiguration();
         readFcInfo();
-        X11FontManager fm = X11FontManager.getInstance();
+        X11FontManager fm = (X11FontManager) fontManager;
         FontConfigManager fcm = fm.getFontConfigManager();
         if (fcCompFonts == null) {
             fcCompFonts = fcm.loadFontConfig();
@@ -187,7 +187,7 @@
     @Override
     public String[] getPlatformFontNames() {
         HashSet<String> nameSet = new HashSet<String>();
-        X11FontManager fm = X11FontManager.getInstance();
+        X11FontManager fm = (X11FontManager) fontManager;
         FontConfigManager fcm = fm.getFontConfigManager();
         FcCompFont[] fcCompFonts = fcm.loadFontConfig();
         for (int i=0; i<fcCompFonts.length; i++) {
@@ -228,7 +228,7 @@
     @Override
     public CompositeFontDescriptor[] get2DCompositeFontInfo() {
 
-        X11FontManager fm = X11FontManager.getInstance();
+        X11FontManager fm = (X11FontManager) fontManager;
         FontConfigManager fcm = fm.getFontConfigManager();
         FcCompFont[] fcCompFonts = fcm.loadFontConfig();
 
@@ -363,7 +363,7 @@
     private void writeFcInfo() {
         Properties props = new Properties();
         props.setProperty("version", fileVersion);
-        X11FontManager fm = X11FontManager.getInstance();
+        X11FontManager fm = (X11FontManager) fontManager;
         FontConfigManager fcm = fm.getFontConfigManager();
         FontConfigInfo fcInfo = fcm.getFontConfigInfo();
         props.setProperty("fcversion", Integer.toString(fcInfo.fcVersion));
@@ -424,7 +424,7 @@
             return;
         }
         Properties props = new Properties();
-        X11FontManager fm = X11FontManager.getInstance();
+        X11FontManager fm = (X11FontManager) fontManager;
         FontConfigManager fcm = fm.getFontConfigManager();
         try {
             FileInputStream fis = new FileInputStream(fcFile);