org.apache.fop.layout
Class FontState
java.lang.Object
|
+--org.apache.fop.layout.FontState
- public class FontState
- extends java.lang.Object
Constructor Summary |
FontState(FontInfo fontInfo,
java.lang.String fontFamily,
java.lang.String fontStyle,
java.lang.String fontWeight,
int fontSize,
int fontVariant)
|
FontState(FontInfo fontInfo,
java.lang.String fontFamily,
java.lang.String fontStyle,
java.lang.String fontWeight,
int fontSize,
int fontVariant,
int letterSpacing)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FontState
public FontState(FontInfo fontInfo,
java.lang.String fontFamily,
java.lang.String fontStyle,
java.lang.String fontWeight,
int fontSize,
int fontVariant)
throws FOPException
FontState
public FontState(FontInfo fontInfo,
java.lang.String fontFamily,
java.lang.String fontStyle,
java.lang.String fontWeight,
int fontSize,
int fontVariant,
int letterSpacing)
throws FOPException
getAscender
public int getAscender()
getLetterSpacing
public int getLetterSpacing()
getCapHeight
public int getCapHeight()
getDescender
public int getDescender()
getFontName
public java.lang.String getFontName()
getFontSize
public int getFontSize()
getFontWeight
public java.lang.String getFontWeight()
getFontFamily
public java.lang.String getFontFamily()
getFontStyle
public java.lang.String getFontStyle()
getFontVariant
public int getFontVariant()
getFontInfo
public FontInfo getFontInfo()
getXHeight
public int getXHeight()
getKerning
public java.util.Map getKerning()
width
public int width(int charnum)
mapChar
public char mapChar(char c)
- Map a java character (unicode) to a font character
Default uses CodePointMapping
getCharWidth
public int getCharWidth(char c)
- Helper method for getting the width of a unicode char
from the current fontstate.
This also performs some guessing on widths on various
versions of space that might not exists in the font.
getWordWidth
public int getWordWidth(java.lang.String word)
- Calculates the word width.
Copyright ? 1999-2003 Apache Software Foundation. All Rights Reserved.