Example usage for com.itextpdf.text Font isUnderlined

List of usage examples for com.itextpdf.text Font isUnderlined

Introduction

In this page you can find the example usage for com.itextpdf.text Font isUnderlined.

Prototype

public boolean isUnderlined() 

Source Link

Document

checks if this font is underlined.

Usage

From source file:adams.core.io.PdfFont.java

License:Open Source License

/**
 * Generates a list of font style names from the given font setup.
 *
 * @param font   the font to analyze//from   ww w .  j  a v  a2 s. co  m
 * @return      the list of font names
 */
public static String[] getFontFaces(Font font) {
    List<String> result;

    result = new ArrayList<String>();
    if (font.isBold())
        result.add(BOLD);
    if (font.isItalic())
        result.add(ITALIC);
    if (font.isStrikethru())
        result.add(STRIKETHRU);
    if (font.isUnderlined())
        result.add(UNDERLINE);
    if (result.size() == 0)
        result.add(NORMAL);

    return result.toArray(new String[result.size()]);
}