| java.lang.Object org.apache.poi.hssf.usermodel.FontDetails
FontDetails | public class FontDetails (Code) | | Stores width and height details about a font.
author: Glen Stampoultzis (glens at apache.org) |
Constructor Summary | |
public | FontDetails(String fontName, int height) Construct the font details with the given name and height. |
FontDetails | public FontDetails(String fontName, int height)(Code) | | Construct the font details with the given name and height.
Parameters: fontName - The font name. Parameters: height - The height of the font. |
addChar | public void addChar(char c, int width)(Code) | | |
addChars | public void addChars(char[] characters, int[] widths)(Code) | | |
buildFontCharactersProperty | protected static String buildFontCharactersProperty(String fontName)(Code) | | |
buildFontHeightProperty | protected static String buildFontHeightProperty(String fontName)(Code) | | |
buildFontWidthsProperty | protected static String buildFontWidthsProperty(String fontName)(Code) | | |
create | public static FontDetails create(String fontName, Properties fontMetricsProps)(Code) | | Create an instance of FontDetails by loading them from the
provided property object.
Parameters: fontName - the font name Parameters: fontMetricsProps - the property object holding the details of thisparticular font. a new FontDetails instance. |
getCharWidth | public int getCharWidth(char c)(Code) | | Retrieves the width of the specified character. If the metrics for
a particular character are not available it defaults to returning the
width for the 'W' character.
|
getHeight | public int getHeight()(Code) | | |
getStringWidth | public int getStringWidth(String str)(Code) | | Gets the width of all characters in a string.
Parameters: str - The string to measure. The width of the string for a 10 point font. |
|
|