protected Rectangle2D getBounds ( TextLayout layout ) { if ( RunAnywhere . isMacOS ( ) ) { return layout . getOutline ( null ) . getBounds ( ) ; } else { return layout . getBounds ( ) ; } }
Gets the bounds of the supplied text layout in a way that works around the various befuckeries that currently happen on the Mac .