|
fop 0.90alpha1 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.render.java2d.FontMetricsMapper
This class implements org.apache.fop.layout.FontMetrics and is added to the hash table in FontInfo. It deferes the actual calculation of the metrics to Java2DFontMetrics. It only keeps the java name and style as member varibles
Constructor Summary | |
FontMetricsMapper(java.lang.String family,
int style,
java.awt.Graphics2D graphics)
Constructs a new Font-metrics. |
Method Summary | |
int |
getAscender(int size)
Returns the ascent of the font described by this FontMetrics object. |
int |
getCapHeight(int size)
Returns the size of a capital letter measured from the font's baseline. |
int |
getDescender(int size)
Returns the descent of the font described by this FontMetrics object. |
java.awt.Font |
getFont(int size)
Gets a Font instance of the Font that this FontMetrics describes in the desired size. |
java.lang.String |
getFontName()
Returns the font name. |
FontType |
getFontType()
Returns the type of the font. |
java.util.Map |
getKerningInfo()
Returns the kerning map for the font. |
int |
getWidth(int i,
int size)
Return the width (in 1/1000ths of point size) of the character at code point i. |
int[] |
getWidths()
Return the array of widths. |
int |
getXHeight(int size)
Determines the typical font height of this FontMetrics object |
boolean |
hasKerningInfo()
Indicates if the font has kering information. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FontMetricsMapper(java.lang.String family, int style, java.awt.Graphics2D graphics)
family
- the family name of the font (java value)style
- the java type style value of the fontgraphics
- a Graphics2D object - this is needed so
that we can get an instance of java.awt.FontMetricsMethod Detail |
public java.lang.String getFontName()
FontMetrics
getFontName
in interface FontMetrics
FontMetrics.getFontName()
public FontType getFontType()
FontMetrics
getFontType
in interface FontMetrics
FontMetrics.getFontType()
public int getAscender(int size)
FontMetrics
getAscender
in interface FontMetrics
size
- font size
FontMetrics.getAscender(int)
public int getCapHeight(int size)
FontMetrics
getCapHeight
in interface FontMetrics
size
- font size
FontMetrics.getCapHeight(int)
public int getDescender(int size)
FontMetrics
getDescender
in interface FontMetrics
size
- font size
FontMetrics.getDescender(int)
public int getXHeight(int size)
FontMetrics
getXHeight
in interface FontMetrics
size
- font size
FontMetrics.getXHeight(int)
public int getWidth(int i, int size)
FontMetrics
getWidth
in interface FontMetrics
i
- code point indexsize
- font size
FontMetrics.getWidth(int, int)
public int[] getWidths()
FontMetrics
This is used to get an array for inserting in an output format. It should not be used for lookup.
getWidths
in interface FontMetrics
FontMetrics.getWidths()
public java.awt.Font getFont(int size)
size
- font size
public java.util.Map getKerningInfo()
FontMetrics
getKerningInfo
in interface FontMetrics
FontMetrics.getKerningInfo()
public boolean hasKerningInfo()
FontMetrics
hasKerningInfo
in interface FontMetrics
FontMetrics.hasKerningInfo()
|
fop 0.90alpha1 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |