org.pentaho.reporting.engine.classic.core.layout
Class DefaultSizeCalculator.BuggyFontRendererDetector

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.layout.DefaultSizeCalculator.BuggyFontRendererDetector
Enclosing class:
DefaultSizeCalculator

public static class DefaultSizeCalculator.BuggyFontRendererDetector
extends Object

A helper class that is able to detect whether the implementation is considered buggy. A non-buggy implementation should show no differences between aliased-versions of Graphics2D and non-aliased versions.

On JDK 1.4 the font renderer changed. In previous versions, the font renderer was sensitive to fractional metrics, so that fonts were always rendered without FractionalMetrics enabled. Since 1.4, fonts are always rendered with FractionalMetrics disabled.

Obviously this is annoying if you try to write a layouter for all JDKs :(


Method Summary
 boolean isAliased()
          Gets the defined aliasing state for the FontRenderContext and the target Graphics2D.
 boolean isBuggyVersion()
          Gets the buggy state of the AWT implementation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isAliased

public boolean isAliased()
Gets the defined aliasing state for the FontRenderContext and the target Graphics2D.

Returns:
the aliasing state.

isBuggyVersion

public boolean isBuggyVersion()
Gets the buggy state of the AWT implementation.

Returns:
true, if the AWT implementation is buggy and not able to perform accurate font rendering.