public interface IFontMetrics
Defines an interface for Font metrics tools.
Modifier and Type | Method and Description |
---|---|
double |
getAscender()
Gets ascender value of the Font in font units.
|
double |
getAscender(double fontSize)
Returns ascender for specific Font size.
|
double |
getDescender()
Gets descender value of the Font in font units.
|
double |
getDescender(double fontSize)
Returns descender for specific Font size.
|
FontBBox |
getFontBBox()
Gets Font bounding box.
|
TransformationMatrix |
getFontMatrix()
Gets Font transformation matrix.
|
FontBBox |
getGlyphBBox(GlyphId glyphId)
Returns glyph BBox.
|
double |
getGlyphWidth(GlyphId glyphId)
Returns glyph width.
|
double |
getKerningValue(GlyphId prevGlyphId,
GlyphId nextGlyphId)
Returns kerning value for the glyph pair.
|
double |
getLineGap()
Gets LineGap value of the Font in Font units.
|
double |
getTypoAscender()
Gets typographic ascender value of the Font in font units
|
double |
getTypoAscender(double fontSize)
Returns typographic ascender for specific Font size.
|
double |
getTypoDescender()
Gets typographic descender value of the Font in Font units.
|
double |
getTypoDescender(double fontSize)
Returns typographic descender for specific Font size.
|
double |
getTypoLineGap()
Gets typographic LineGap value of the Font in Font units.
|
double |
getTypoLineGap(double fontSize)
Returns line gap for specific Font size.
|
long |
getUnitsPerEM()
Gets Gets units per em.
|
boolean |
isFixedPitch()
True, if the Font is monospaced.
|
double |
measureString(String unicode,
double fontSize)
Measures string and returns string width.
|
void |
setAscender(double value) |
void |
setDescender(double value) |
void |
setTypoAscender(double value) |
void |
setTypoDescender(double value) |
void |
setUnitsPerEM(long value) |
boolean isFixedPitch()
True, if the Font is monospaced.
FontBBox getFontBBox()
Gets Font bounding box.
TransformationMatrix getFontMatrix()
Gets Font transformation matrix.
long getUnitsPerEM()
Gets Gets units per em.
void setUnitsPerEM(long value)
double getAscender()
Gets ascender value of the Font in font units.
void setAscender(double value)
double getTypoAscender()
Gets typographic ascender value of the Font in font units
void setTypoAscender(double value)
double getDescender()
Gets descender value of the Font in font units.
void setDescender(double value)
double getTypoDescender()
Gets typographic descender value of the Font in Font units.
void setTypoDescender(double value)
double getLineGap()
Gets LineGap value of the Font in Font units.
double getTypoLineGap()
Gets typographic LineGap value of the Font in Font units.
double getKerningValue(GlyphId prevGlyphId, GlyphId nextGlyphId)
Returns kerning value for the glyph pair.
prevGlyphId
- First glyph in pair.nextGlyphId
- Font size.double getGlyphWidth(GlyphId glyphId)
Returns glyph width.
glyphId
- Glyph identifier.FontBBox getGlyphBBox(GlyphId glyphId)
Returns glyph BBox.
glyphId
- glyph identifierdouble getAscender(double fontSize)
Returns ascender for specific Font size.
fontSize
- Font size.double getDescender(double fontSize)
Returns descender for specific Font size.
fontSize
- Font size.double getTypoDescender(double fontSize)
Returns typographic descender for specific Font size.
fontSize
- Font size.double getTypoAscender(double fontSize)
Returns typographic ascender for specific Font size.
fontSize
- Font size.double getTypoLineGap(double fontSize)
Returns line gap for specific Font size.
fontSize
- Font size.double measureString(String unicode, double fontSize)
Measures string and returns string width.
unicode
- Unicode string.fontSize
- Font size.