FontRenderContext aaFontContext ( ) { if ( aaFontContext == null ) { // set up the dummy font contexts Graphics2D aaGfx = new BufferedImage ( 1 , 1 , BufferedImage . TYPE_INT_ARGB ) . createGraphics ( ) ; aaGfx . setRenderingHint ( RenderingHints . KEY_ANTIALIASING , RenderingHints . VALUE_ANTIALIAS_ON ) ; aaFontContext = aaGfx . getFontRenderContext ( ) ; } return aaFontContext ; }
these are initialized lazily to avoid doing any AWT stuff during startup