|
fop 0.93 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.fop.fonts.Typeface
org.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.lang.String |
getEncoding()
Get the encoding of the font. |
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 |
getMaxAscent(int size)
Returns the maximum ascent of the font described by this FontMetrics object. |
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 |
hasChar(char c)
Determines whether this font contains a particular character/glyph. |
boolean |
hasKerningInfo()
Indicates if the font has kering information. |
char |
mapChar(char c)
Map a Unicode character to a code point in the font. |
| Methods inherited from class org.apache.fop.fonts.Typeface |
isMultiByte |
| 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.FontMetrics| Method Detail |
public java.lang.String getFontName()
FontMetrics
getFontName in interface FontMetricsFontMetrics.getFontName()public FontType getFontType()
FontMetrics
getFontType in interface FontMetricsFontMetrics.getFontType()public int getMaxAscent(int size)
FontMetrics
getMaxAscent in interface FontMetricsgetMaxAscent in class TypefaceFontMetrics.getMaxAscent(int)public int getAscender(int size)
FontMetrics
getAscender in interface FontMetricssize - font size
FontMetrics.getAscender(int)public int getCapHeight(int size)
FontMetrics
getCapHeight in interface FontMetricssize - font size
FontMetrics.getCapHeight(int)public int getDescender(int size)
FontMetrics
getDescender in interface FontMetricssize - font size
FontMetrics.getDescender(int)public int getXHeight(int size)
FontMetrics
getXHeight in interface FontMetricssize - font size
FontMetrics.getXHeight(int)
public int getWidth(int i,
int size)
FontMetrics
getWidth in interface FontMetricsi - code point indexsize - font size
FontMetrics.getWidth(int, int)public int[] getWidths()
FontMetricsThis is used to get an array for inserting in an output format. It should not be used for lookup.
getWidths in interface FontMetricsFontMetrics.getWidths()public java.awt.Font getFont(int size)
size - font size
public java.util.Map getKerningInfo()
FontMetrics
getKerningInfo in interface FontMetricsFontMetrics.getKerningInfo()public boolean hasKerningInfo()
FontMetrics
hasKerningInfo in interface FontMetricsFontMetrics.hasKerningInfo()public java.lang.String getEncoding()
Typeface
getEncoding in class TypefaceTypeface.getEncoding()public char mapChar(char c)
Typeface
mapChar in class Typefacec - character to map
Typeface.mapChar(char)public boolean hasChar(char c)
Typeface
hasChar in class Typefacec - character to check
Typeface.hasChar(char)
|
fop 0.93 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||