Example usage for com.lowagie.text Font getCalculatedStyle

List of usage examples for com.lowagie.text Font getCalculatedStyle

Introduction

In this page you can find the example usage for com.lowagie.text Font getCalculatedStyle.

Prototype

public int getCalculatedStyle() 

Source Link

Document

Gets the style that can be used with the calculated BaseFont .

Usage

From source file:com.krawler.accounting.fontsetting.FontFamily.java

License:Open Source License

public void addFont(FontContext context, Font font) {
    if (font.getBaseFont() == null) {
        BaseFont bf = font.getCalculatedBaseFont(true);
        font = new Font(bf, font.getSize(), font.getCalculatedStyle(), font.getColor());
    }/*from ww w .j a  va 2  s  . c o  m*/
    fontsMap.put(context, font);
    if (primaryFont == null)
        primaryFont = font;
}

From source file:com.krawler.accounting.fontsetting.FontFamily.java

License:Open Source License

public void addFont(FontContext context, Font font, boolean isPrimary) {
    if (font.getBaseFont() == null) {
        BaseFont bf = font.getCalculatedBaseFont(true);
        font = new Font(bf, font.getSize(), font.getCalculatedStyle(), font.getColor());
    }//from w  w w  . j  a va2 s .c o m
    fontsMap.put(context, font);
    if (isPrimary)
        primaryFont = font;
}

From source file:com.krawler.accounting.fontsetting.FontFamilySelector.java

License:Open Source License

public void addFontFamily(FontFamily fontFamily) {
    Font font = fontFamily.getPrimaryFont();

    if (font.getBaseFont() == null) {
        BaseFont bf = font.getCalculatedBaseFont(true);
        font = new Font(bf, font.getSize(), font.getCalculatedStyle(), font.getColor());
    }/*  w  ww .  j  a  va  2 s  .com*/

    families.add(fontFamily);
}