private int fixFontSize(float pointSize){
  if (screenRes != 72) {
    pointSize=(int)Math.round(pointSize * screenRes / 72.0);
  }
  return (int)pointSize;
}

private int fixFontSize ( float pointSize ) { if ( screenRes != 72 ) { pointSize = ( int ) Math . round ( pointSize * screenRes / 72.0 ) ; } return ( int ) pointSize ; }
returns a font point size adjusted for the current screen resolution . java2d assumes 72 dpi . on systems with larger dpi ( windows , gtk , etc . ) , font rendering will appear to small if we simply return a java " font " object ' s getsize ( ) value . we need to adjust it for the screen resolution .
