@Override public void paintText(SynthContext ss,Graphics g,String text,int x,int y,int mnemonicIndex){
  Graphics2D g2=(Graphics2D)g;
  if (desktopHints == null) {
    Toolkit toolkit=Toolkit.getDefaultToolkit();
    desktopHints=(Map<?,?>)(toolkit.getDesktopProperty("awt.font.desktophints"));
  }
  Object oldAA=null;
  RenderingHints oldHints=null;
  if (desktopHints != null) {
    oldHints=getRenderingHints(g2,desktopHints,null);
    g2.addRenderingHints(desktopHints);
  }
 else {
    oldAA=g2.getRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING);
    g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
  }
  super.paintText(ss,g,text,x,y,mnemonicIndex);
  if (oldHints != null)   g2.addRenderingHints(oldHints);
 else   if (oldAA != null)   g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,oldAA);
}

@ Override public void paintText ( SynthContext ss , Graphics g , String text , int x , int y , int mnemonicIndex ) { Graphics2D g2 = ( Graphics2D ) g ; if ( desktopHints == null ) { Toolkit toolkit = Toolkit . getDefaultToolkit ( ) ; desktopHints = ( Map < ? , ? > ) ( toolkit . getDesktopProperty ( "awt.font.desktophints" ) ) ; } Object oldAA = null ; RenderingHints oldHints = null ; if ( desktopHints != null ) { oldHints = getRenderingHints ( g2 , desktopHints , null ) ; g2 . addRenderingHints ( desktopHints ) ; } else { oldAA = g2 . getRenderingHint ( RenderingHints . KEY_TEXT_ANTIALIASING ) ; g2 . setRenderingHint ( RenderingHints . KEY_TEXT_ANTIALIASING , RenderingHints . VALUE_TEXT_ANTIALIAS_ON ) ; } super . paintText ( ss , g , text , x , y , mnemonicIndex ) ; if ( oldHints != null ) g2 . addRenderingHints ( oldHints ) ; else if ( oldAA != null ) g2 . setRenderingHint ( RenderingHints . KEY_TEXT_ANTIALIASING , oldAA ) ; }
overrides painttext in synthgraphicsutils to force all synth painted text to be antialiased
