public static Font getFont ( Font font , Size size ) { float s ; switch ( size ) { case smallest : s = ( float ) ( font . getSize ( ) * 0.5 ) ; break ; case much_smaller : s = ( float ) ( font . getSize ( ) * 0.7 ) ; break ; case smaller : s = ( float ) ( font . getSize ( ) * 0.8 ) ; break ; case standard : s = ( float ) font . getSize ( ) ; break ; case larger : s = ( float ) ( font . getSize ( ) * 1.5 ) ; break ; case much_larger : s = ( float ) ( font . getSize ( ) * 3 ) ; break ; case huge : s = ( float ) ( font . getSize ( ) * 4 ) ; break ; default : s = ( float ) ( font . getSize ( ) ) ; break ; } return font . deriveFont ( s ) ; }
Gets the specified font with the specified size correctly scaled