Class Fonts


  • public class Fonts
    extends java.lang.Object
    Registry of fonts, especially system fonts.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Font get​(java.lang.String name, int size, int style)
      Returns the given font.
      static Font system()
      Returns the default font for this system.
      static Font systemBold()
      Returns the default bold font for this system.
      static Font systemLarge()
      Returns a largish system font appropriate for dialog headers.
      static Font systemMonospace()
      Returns a monospace font for this system.
      static FontData systemMonospaceFontData()
      Calculates the best monospaced font available on this system, can be called from any thread.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • get

        public static Font get​(java.lang.String name,
                               int size,
                               int style)
        Returns the given font.
      • system

        public static Font system()
        Returns the default font for this system.
      • systemBold

        public static Font systemBold()
        Returns the default bold font for this system.
      • systemLarge

        public static Font systemLarge()
        Returns a largish system font appropriate for dialog headers.
      • systemMonospace

        public static Font systemMonospace()
        Returns a monospace font for this system.
      • systemMonospaceFontData

        public static FontData systemMonospaceFontData()
        Calculates the best monospaced font available on this system, can be called from any thread.