CffFontMetrics
Inheritance: java.lang.Object, com.aspose.font.FontMetrics
public class CffFontMetrics extends FontMetrics
CFF font metrics implementation
Methods
Method | Description |
---|---|
getAscender() | Gets Ascender value. |
getDescender() | Gets Descender value. |
getFontBBox() | Gets FontBBox value. |
getFontMatrix() | Gets FontMatrix value. |
getFontMatrixForGlyph(GlyphId glyphId) | Calculates transformation matrix for glyph specified by id. |
getUnitsPerEM() | Gets UnitsPerEM value. |
getGlyphWidth(GlyphId glyphId) | Returns glyph width. |
measureString(String unicode, double fontSize) | Measures string and returns string width. |
getAscender()
public double getAscender()
Gets Ascender value.
Returns: double - Ascender value.
getDescender()
public double getDescender()
Gets Descender value.
Returns: double - Descender value.
getFontBBox()
public FontBBox getFontBBox()
Gets FontBBox value.
Returns: FontBBox - FontBBox value.
getFontMatrix()
public TransformationMatrix getFontMatrix()
Gets FontMatrix value.
Returns: TransformationMatrix - FontMatrix value.
getFontMatrixForGlyph(GlyphId glyphId)
public TransformationMatrix getFontMatrixForGlyph(GlyphId glyphId)
Calculates transformation matrix for glyph specified by id.
Parameters:
Parameter | Type | Description |
---|---|---|
glyphId | GlyphId | Glyph identifier. |
Returns: TransformationMatrix - Glyph transformation matrix.
getUnitsPerEM()
public long getUnitsPerEM()
Gets UnitsPerEM value.
Returns: long - UnitsPerEM value.
getGlyphWidth(GlyphId glyphId)
public double getGlyphWidth(GlyphId glyphId)
Returns glyph width. May be overridden by specific Font encoding inheritors.
Parameters:
Parameter | Type | Description |
---|---|---|
glyphId | GlyphId | Glyph identifier. |
Returns: double - Glyph width.
measureString(String unicode, double fontSize)
public double measureString(String unicode, double fontSize)
Measures string and returns string width.
Parameters:
Parameter | Type | Description |
---|---|---|
unicode | java.lang.String | Unicode string. |
fontSize | double | Font size. |
Returns: double - String width.