Example usage for com.itextpdf.text Font isStrikethru

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

Introduction

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

Prototype

public boolean isStrikethru() 

Source Link

Document

checks if the style of this font is STRIKETHRU.

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//w  w  w.j  a va2  s .  c  om
 * @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()]);
}