Example usage for java.awt.font TextAttribute WEIGHT_LIGHT

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

Introduction

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

Prototype

Float WEIGHT_LIGHT

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

Click Source Link

Document

The standard light 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 {//from ww w  .  j a  va2 s. c  om
        return 900;
    }
}