org.apache.fop.layout
Class FontState

java.lang.Object
  extended by org.apache.fop.layout.FontState

public class FontState
extends Object


Constructor Summary
FontState(FontInfo fontInfo, String fontFamily, String fontStyle, String fontWeight, int fontSize, int fontVariant)
           
FontState(FontInfo fontInfo, String fontFamily, String fontStyle, String fontWeight, int fontSize, int fontVariant, int letterSpacing)
           
 
Method Summary
 int getAscender()
           
 int getCapHeight()
           
 int getCharWidth(char c)
          Helper method for getting the width of a unicode char from the current fontstate.
 int getDescender()
           
 String getFontFamily()
           
 FontInfo getFontInfo()
           
 String getFontName()
           
 int getFontSize()
           
 String getFontStyle()
           
 int getFontVariant()
           
 String getFontWeight()
           
 Map getKerning()
           
 int getLetterSpacing()
           
 int getWordWidth(String word)
          Calculates the word width.
 int getXHeight()
           
 char mapChar(char c)
          Map a java character (unicode) to a font character Default uses CodePointMapping
 int width(int charnum)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FontState

public FontState(FontInfo fontInfo,
                 String fontFamily,
                 String fontStyle,
                 String fontWeight,
                 int fontSize,
                 int fontVariant)
          throws FOPException
Throws:
FOPException

FontState

public FontState(FontInfo fontInfo,
                 String fontFamily,
                 String fontStyle,
                 String fontWeight,
                 int fontSize,
                 int fontVariant,
                 int letterSpacing)
          throws FOPException
Throws:
FOPException
Method Detail

getAscender

public int getAscender()

getLetterSpacing

public int getLetterSpacing()

getCapHeight

public int getCapHeight()

getDescender

public int getDescender()

getFontName

public String getFontName()

getFontSize

public int getFontSize()

getFontWeight

public String getFontWeight()

getFontFamily

public String getFontFamily()

getFontStyle

public String getFontStyle()

getFontVariant

public int getFontVariant()

getFontInfo

public FontInfo getFontInfo()

getXHeight

public int getXHeight()

getKerning

public 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(String word)
Calculates the word width.



Copyright ? 1999-2003 Apache Software Foundation. All Rights Reserved.