< prev index next >

src/java.desktop/share/classes/sun/font/FontUtilities.java

Print this page
rev 60042 : 8248802: Add log helper methods to FontUtilities.java


 307             return true;
 308         }
 309         else if (code >= 0x206a && code <= 0x206f) { // directional control
 310             return true;
 311         }
 312         return false;
 313     }
 314 
 315     public static PlatformLogger getLogger() {
 316         return logger;
 317     }
 318 
 319     public static boolean isLogging() {
 320         return logging;
 321     }
 322 
 323     public static boolean debugFonts() {
 324         return debugFonts;
 325     }
 326 

















 327 
 328     // The following methods are used by Swing.
 329 
 330     /* Revise the implementation to in fact mean "font is a composite font.
 331      * This ensures that Swing components will always benefit from the
 332      * fall back fonts
 333      */
 334     public static boolean fontSupportsDefaultEncoding(Font font) {
 335         return getFont2D(font) instanceof CompositeFont;
 336     }
 337 
 338     /**
 339      * This method is provided for internal and exclusive use by Swing.
 340      *
 341      * It may be used in conjunction with fontSupportsDefaultEncoding(Font)
 342      * In the event that a desktop properties font doesn't directly
 343      * support the default encoding, (ie because the host OS supports
 344      * adding support for the current locale automatically for native apps),
 345      * then Swing calls this method to get a font which  uses the specified
 346      * font for the code points it covers, but also supports this locale




 307             return true;
 308         }
 309         else if (code >= 0x206a && code <= 0x206f) { // directional control
 310             return true;
 311         }
 312         return false;
 313     }
 314 
 315     public static PlatformLogger getLogger() {
 316         return logger;
 317     }
 318 
 319     public static boolean isLogging() {
 320         return logging;
 321     }
 322 
 323     public static boolean debugFonts() {
 324         return debugFonts;
 325     }
 326 
 327     public static void logWarning(String s) {
 328         if (isLogging()) {
 329             getLogger().warning(s);
 330         }
 331     }
 332 
 333     public static void logInfo(String s) {
 334         if (isLogging()) {
 335             getLogger().info(s);
 336         }
 337     }
 338 
 339     public static void logSevere(String s) {
 340         if (isLogging()) {
 341             getLogger().severe(s);
 342         }
 343     }
 344 
 345     // The following methods are used by Swing.
 346 
 347     /* Revise the implementation to in fact mean "font is a composite font.
 348      * This ensures that Swing components will always benefit from the
 349      * fall back fonts
 350      */
 351     public static boolean fontSupportsDefaultEncoding(Font font) {
 352         return getFont2D(font) instanceof CompositeFont;
 353     }
 354 
 355     /**
 356      * This method is provided for internal and exclusive use by Swing.
 357      *
 358      * It may be used in conjunction with fontSupportsDefaultEncoding(Font)
 359      * In the event that a desktop properties font doesn't directly
 360      * support the default encoding, (ie because the host OS supports
 361      * adding support for the current locale automatically for native apps),
 362      * then Swing calls this method to get a font which  uses the specified
 363      * font for the code points it covers, but also supports this locale


< prev index next >