Java Code Examples for com.lowagie.text.Font#getCalculatedStyle()

The following examples show how to use com.lowagie.text.Font#getCalculatedStyle() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FontSelector.java    From gcs with Mozilla Public License 2.0 5 votes vote down vote up
/**
 * Adds a <CODE>Font</CODE> to be searched for valid characters.
 * 
 * @param font the <CODE>Font</CODE>
 */
public void addFont(Font font) {
	if (font.getBaseFont() != null) {
		fonts.add(font);
		return;
	}
	BaseFont bf = font.getCalculatedBaseFont(true);
	Font f2 = new Font(bf, font.getSize(), font.getCalculatedStyle(), font.getColor());
	fonts.add(f2);
}
 
Example 2
Source File: FontSelector.java    From itext2 with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * Adds a <CODE>Font</CODE> to be searched for valid characters.
 * @param font the <CODE>Font</CODE>
 */    
public void addFont(Font font) {
    if (font.getBaseFont() != null) {
        fonts.add(font);
        return;
    }
    BaseFont bf = font.getCalculatedBaseFont(true);
    Font f2 = new Font(bf, font.getSize(), font.getCalculatedStyle(), font.getColor());
    fonts.add(f2);
}