Example usage for java.awt.font TextAttribute WEIGHT_DEMILIGHT

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

Introduction

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

Prototype

Float WEIGHT_DEMILIGHT

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

Click Source Link

Document

An intermediate weight between WEIGHT_LIGHT and WEIGHT_STANDARD .

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   w w w.  j a va2s .c  o m
        return 900;
    }
}