List of usage examples for com.lowagie.text Font getCalculatedStyle
public int getCalculatedStyle()
BaseFont
. 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); }