Example usage for java.awt Font isTransformed

List of usage examples for java.awt Font isTransformed

Introduction

In this page you can find the example usage for java.awt Font isTransformed.

Prototype

public boolean isTransformed() 

Source Link

Document

Indicates whether or not this Font object has a transform that affects its size in addition to the Size attribute.

Usage

From source file:Main.java

public void paint(Graphics g) {
    Font f = g.getFont();

    System.out.println(f.isTransformed());

    g.drawString("java2s.com", 4, 16);
}

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();
}