Example usage for java.awt.font TextAttribute KERNING_ON

List of usage examples for java.awt.font TextAttribute KERNING_ON

Introduction

In this page you can find the example usage for java.awt.font TextAttribute KERNING_ON.

Prototype

Integer KERNING_ON

To view the source code for java.awt.font TextAttribute KERNING_ON.

Click Source Link

Document

Request standard kerning.

Usage

From source file:net.sf.jasperreports.engine.fill.SimpleTextLineWrapper.java

protected boolean determineComplexLayout(Font font) {
    // this tries to emulate the tests in Font.getStringBounds()
    //FIXME use font.hasLayoutAttributes() instead of this?
    Map<TextAttribute, ?> fontAttributes = font.getAttributes();
    Object kerning = fontAttributes.get(TextAttribute.KERNING);
    Object ligatures = fontAttributes.get(TextAttribute.LIGATURES);
    return (kerning != null && TextAttribute.KERNING_ON.equals(kerning))
            || (ligatures != null && TextAttribute.LIGATURES_ON.equals(ligatures)) || font.isTransformed();
}