FontMetrics
Inheritance: java.lang.Object
All Implemented Interfaces: com.aspose.font.IFontMetrics
public abstract class FontMetrics implements IFontMetrics
Represents font metrics.
Methods
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Object |
Returns: boolean
getAscender()
public double getAscender()
Gets Ascender value.
Returns: double - Ascender value.
getAscender(double fontSize)
public double getAscender(double fontSize)
Returns ascender for specific Font size.
Parameters:
Parameter | Type | Description |
---|---|---|
fontSize | double | Font size. |
Returns: double - Ascender value.
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getDescender()
public double getDescender()
Gets Descender value.
Returns: double - Descender value.
getDescender(double fontSize)
public double getDescender(double fontSize)
Returns descender for specific Font size.
Parameters:
Parameter | Type | Description |
---|---|---|
fontSize | double | Font size. |
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.
getGlyphBBox(GlyphId glyphId)
public FontBBox getGlyphBBox(GlyphId glyphId)
Returns glyph Bbox. Returns FontBBox if BBox was not defined for the glyph. May be overridden by specific font encoding inheritors.
Parameters:
Parameter | Type | Description |
---|---|---|
glyphId | GlyphId | Glyph identifier. |
Returns: FontBBox - Glyph BBox.
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.
getKerningValue(GlyphId prevGlyphId, GlyphId nextGlyphId)
public double getKerningValue(GlyphId prevGlyphId, GlyphId nextGlyphId)
Returns kerning value for the glyph pair.
Parameters:
Parameter | Type | Description |
---|---|---|
prevGlyphId | GlyphId | First glyph in pair. |
nextGlyphId | GlyphId | Font size. |
Returns: double - Kerning value.
getLineGap()
public double getLineGap()
Gets LineGap value.
Returns: double - LineGap value.
getTypoAscender()
public double getTypoAscender()
Gets TypoAscender value.
Returns: double - TypoAscender value.
getTypoAscender(double fontSize)
public double getTypoAscender(double fontSize)
Returns typographic ascender for specific Font size.
Parameters:
Parameter | Type | Description |
---|---|---|
fontSize | double | Font size. |
Returns: double - Typographic ascender value.
getTypoDescender()
public double getTypoDescender()
Gets TypoDescender value.
Returns: double - TypoDescender value.
getTypoDescender(double fontSize)
public double getTypoDescender(double fontSize)
Returns typographic descender for specific font size
param fontSize Font size.
Parameters:
Parameter | Type | Description |
---|---|---|
fontSize | double |
Returns: double - Typographic descender value.
getTypoLineGap()
public double getTypoLineGap()
Gets TypoLineGap value.
Returns: double - TypoLineGap value.
getTypoLineGap(double fontSize)
public double getTypoLineGap(double fontSize)
Returns line gap for specific Font size.
Parameters:
Parameter | Type | Description |
---|---|---|
fontSize | double | Font size. |
Returns: double - Line gap value.
getUnitsPerEM()
public long getUnitsPerEM()
Gets UnitsPerEM value.
Returns: long - UnitsPerEM value.
hashCode()
public native int hashCode()
Returns: int
isFixedPitch()
public boolean isFixedPitch()
Gets IsFixedPitch value.
Returns: boolean - IsFixedPitch value.
measureString(String unicode, double fontSize)
public abstract 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.
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
setAscender(double value)
public void setAscender(double value)
Sets Ascender value.
Parameters:
Parameter | Type | Description |
---|---|---|
value | double | Ascender value. |
setDescender(double value)
public void setDescender(double value)
Sets Descender value.
Parameters:
Parameter | Type | Description |
---|---|---|
value | double | Descender value. |
setTypoAscender(double value)
public void setTypoAscender(double value)
Sets TypoAscender value.
Parameters:
Parameter | Type | Description |
---|---|---|
value | double | TypoAscender value. |
setTypoDescender(double value)
public void setTypoDescender(double value)
Sets TypoDescender value.
Parameters:
Parameter | Type | Description |
---|---|---|
value | double | TypoDescender value. |
setUnitsPerEM(long value)
public void setUnitsPerEM(long value)
Sets UnitsPerEM value.
Parameters:
Parameter | Type | Description |
---|---|---|
value | long | UnitsPerEM value. |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |