public class CffFontMetrics extends FontMetrics
CFF font metrics implementation
Modifier and Type | Method and Description |
---|---|
double |
getAscender()
Gets Ascender value.
|
double |
getDescender()
Gets Descender value.
|
FontBBox |
getFontBBox()
Gets FontBBox value.
|
TransformationMatrix |
getFontMatrix()
Gets FontMatrix value.
|
TransformationMatrix |
getFontMatrixForGlyph(GlyphId glyphId)
Calculates transformation matrix for glyph specified by id.
|
double |
getGlyphWidth(GlyphId glyphId)
Returns glyph width.
|
long |
getUnitsPerEM()
Gets UnitsPerEM value.
|
double |
measureString(String unicode,
double fontSize)
Measures string and returns string width.
|
getAscender, getDescender, getGlyphBBox, getKerningValue, getLineGap, getTypoAscender, getTypoAscender, getTypoDescender, getTypoDescender, getTypoLineGap, getTypoLineGap, isFixedPitch, setAscender, setDescender, setTypoAscender, setTypoDescender, setUnitsPerEM
public double getAscender()
Gets Ascender value.
getAscender
in interface IFontMetrics
getAscender
in class FontMetrics
public double getDescender()
Gets Descender value.
getDescender
in interface IFontMetrics
getDescender
in class FontMetrics
public FontBBox getFontBBox()
Gets FontBBox value.
getFontBBox
in interface IFontMetrics
getFontBBox
in class FontMetrics
public TransformationMatrix getFontMatrix()
Gets FontMatrix value.
getFontMatrix
in interface IFontMetrics
getFontMatrix
in class FontMetrics
public TransformationMatrix getFontMatrixForGlyph(GlyphId glyphId)
Calculates transformation matrix for glyph specified by id.
glyphId
- Glyph identifier.public long getUnitsPerEM()
Gets UnitsPerEM value.
getUnitsPerEM
in interface IFontMetrics
getUnitsPerEM
in class FontMetrics
public double getGlyphWidth(GlyphId glyphId)
Returns glyph width. May be overridden by specific Font encoding inheritors.
getGlyphWidth
in interface IFontMetrics
getGlyphWidth
in class FontMetrics
glyphId
- Glyph identifier.public double measureString(String unicode, double fontSize)
Measures string and returns string width.
measureString
in interface IFontMetrics
measureString
in class FontMetrics
unicode
- Unicode string.fontSize
- Font size.