Example usage for java.awt.font TextAttribute WEIGHT_EXTRA_LIGHT

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

Introduction

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

Prototype

Float WEIGHT_EXTRA_LIGHT

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

Click Source Link

Document

The lightest predefined weight.

Usage

From source file:org.apache.fop.svg.ACIUtils.java

private static int toCSSWeight(Float weight) {
    if (weight == null) {
        return 400;
    } else if (weight <= TextAttribute.WEIGHT_EXTRA_LIGHT.floatValue()) {
        return 100;
    } else if (weight <= TextAttribute.WEIGHT_LIGHT.floatValue()) {
        return 200;
    } else if (weight <= TextAttribute.WEIGHT_DEMILIGHT.floatValue()) {
        return 300;
    } else if (weight <= TextAttribute.WEIGHT_REGULAR.floatValue()) {
        return 400;
    } else if (weight <= TextAttribute.WEIGHT_SEMIBOLD.floatValue()) {
        return 500;
    } else if (weight < TextAttribute.WEIGHT_BOLD.floatValue()) {
        return 600;
    } else if (weight == TextAttribute.WEIGHT_BOLD.floatValue()) {
        return 700;
    } else if (weight <= TextAttribute.WEIGHT_HEAVY.floatValue()) {
        return 800;
    } else if (weight <= TextAttribute.WEIGHT_EXTRABOLD.floatValue()) {
        return 900;
    } else {/* ww w.  jav  a 2s  . c  o m*/
        return 900;
    }
}