com.itextpdf.tool.xml.css
Class FontSizeTranslator

java.lang.Object
  extended by com.itextpdf.tool.xml.css.FontSizeTranslator

public class FontSizeTranslator
extends Object

Author:
Emiel Ackermann

Field Summary
static float DEFAULT_FONT_SIZE
           
 
Constructor Summary
FontSizeTranslator()
           
 
Method Summary
 float getFontSize(Tag tag)
          Retrieves the pt font size from Tag.getCSS() with CSS.Property.FONT_SIZE or returns default 12pt
static FontSizeTranslator getInstance()
           
 float translateFontSize(Tag tag)
          Returns the css value of the style font-size in a pt-value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FONT_SIZE

public static final float DEFAULT_FONT_SIZE
See Also:
Constant Field Values
Constructor Detail

FontSizeTranslator

public FontSizeTranslator()
Method Detail

getInstance

public static FontSizeTranslator getInstance()
Returns:
Singleton instance of FontSizeTranslater.

translateFontSize

public float translateFontSize(Tag tag)
Returns the css value of the style font-size in a pt-value. Possible font-size values:

Parameters:
tag - to get the font size of.
Returns:
float font size of the content of the tag in pt.

getFontSize

public float getFontSize(Tag tag)
Retrieves the pt font size from Tag.getCSS() with CSS.Property.FONT_SIZE or returns default 12pt

Parameters:
tag - the tag to get the font-size from.
Returns:
the font size


Copyright © 2012. All Rights Reserved.