|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.render.awt.FontMetricsMapper
This class implements org.apache.fop.layout.FontMetric and is added to the hash table in FontInfo. It deferes the actual calculation of the metrics to AWTFontMetrics. 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)
Determines the font ascent of the Font described by this FontMetrics object |
int |
getCapHeight(int size)
The size of a capital letter measured from the font's baseline |
int |
getDescender(int size)
Determines the font descent of the Font described by this FontMetrics object |
int |
getFirstChar()
|
java.awt.Font |
getFont(int size)
Gets a Font instance of the Font that this FontMetrics describes in the desired size. |
int |
getLastChar()
|
int[] |
getWidths(int size)
return width (in 1/1000ths of point size) of all character |
int |
getXHeight(int size)
Determines the typical font height of this FontMetrics object |
void |
setEmbedFont(java.net.URL fontURL)
Create Original Font. |
int |
width(int i,
int size)
return width (in 1/1000ths of point size) of character at code point i. |
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 fontMethod Detail |
public void setEmbedFont(java.net.URL fontURL)
fontURL
- URL to truetype fontpublic int getAscender(int size)
getAscender
in interface FontMetric
public int getCapHeight(int size)
getCapHeight
in interface FontMetric
public int getDescender(int size)
getDescender
in interface FontMetric
public int getXHeight(int size)
getXHeight
in interface FontMetric
public int getFirstChar()
getFirstChar
in interface FontMetric
public int getLastChar()
getLastChar
in interface FontMetric
public int width(int i, int size)
width
in interface FontMetric
public int[] getWidths(int size)
getWidths
in interface FontMetric
public java.awt.Font getFont(int size)
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |