jdk/src/solaris/classes/sun/font/FontConfigManager.java
changeset 3938 ef327bd847c0
parent 3931 81071c37cc91
child 5506 202f599c92aa
equal deleted inserted replaced
3934:487e1aa949c4 3938:ef327bd847c0
    24  */
    24  */
    25 
    25 
    26 package sun.font;
    26 package sun.font;
    27 
    27 
    28 import java.util.Locale;
    28 import java.util.Locale;
    29 import java.util.logging.Logger;
       
    30 
    29 
    31 import sun.awt.SunHints;
    30 import sun.awt.SunHints;
    32 import sun.awt.SunToolkit;
    31 import sun.awt.SunToolkit;
       
    32 import sun.util.logging.PlatformLogger;
    33 
    33 
    34 /**
    34 /**
    35  * Small utility class to manage FontConfig.
    35  * Small utility class to manage FontConfig.
    36  */
    36  */
    37 public class FontConfigManager {
    37 public class FontConfigManager {
   198         /* If don't find anything (eg no libfontconfig), then just return */
   198         /* If don't find anything (eg no libfontconfig), then just return */
   199         for (int i = 0; i< fontArr.length; i++) {
   199         for (int i = 0; i< fontArr.length; i++) {
   200             FcCompFont fci = fontArr[i];
   200             FcCompFont fci = fontArr[i];
   201             if (fci.firstFont == null) {
   201             if (fci.firstFont == null) {
   202                 if (FontUtilities.isLogging()) {
   202                 if (FontUtilities.isLogging()) {
   203                     Logger logger = FontUtilities.getLogger();
   203                     PlatformLogger logger = FontUtilities.getLogger();
   204                     logger.info("Fontconfig returned no font for " +
   204                     logger.info("Fontconfig returned no font for " +
   205                                 fontArr[i].fcName);
   205                                 fontArr[i].fcName);
   206                 }
   206                 }
   207                 fontConfigFailed = true;
   207                 fontConfigFailed = true;
   208             } else if (anyFont == null) {
   208             } else if (anyFont == null) {
   210             }
   210             }
   211         }
   211         }
   212 
   212 
   213         if (anyFont == null) {
   213         if (anyFont == null) {
   214             if (FontUtilities.isLogging()) {
   214             if (FontUtilities.isLogging()) {
   215                 Logger logger = FontUtilities.getLogger();
   215                 PlatformLogger logger = FontUtilities.getLogger();
   216                 logger.info("Fontconfig returned no fonts at all.");
   216                 logger.info("Fontconfig returned no fonts at all.");
   217                 return;
   217                 return;
   218             }
   218             }
   219         } else if (fontConfigFailed) {
   219         } else if (fontConfigFailed) {
   220             for (int i = 0; i< fontArr.length; i++) {
   220             for (int i = 0; i< fontArr.length; i++) {
   226 
   226 
   227         fontConfigFonts = fontArr;
   227         fontConfigFonts = fontArr;
   228 
   228 
   229         if (FontUtilities.isLogging()) {
   229         if (FontUtilities.isLogging()) {
   230 
   230 
   231             Logger logger = FontUtilities.getLogger();
   231             PlatformLogger logger = FontUtilities.getLogger();
   232 
   232 
   233             long t1 = System.nanoTime();
   233             long t1 = System.nanoTime();
   234             logger.info("Time spent accessing fontconfig="
   234             logger.info("Time spent accessing fontconfig="
   235                         + ((t1 - t0) / 1000000) + "ms.");
   235                         + ((t1 - t0) / 1000000) + "ms.");
   236 
   236