TtfFontMetrics
Inheritance: java.lang.Object, com.aspose.font.FontMetrics
public class TtfFontMetrics extends FontMetrics
Represents TTF Font metrics.
Methods
| Method | Description |
|---|---|
| equals(Object arg0) | |
| getAscender() | Gets ascender value. |
| getAscender(double fontSize) | Returns ascender for specific Font size. |
| getClass() | |
| getDescender() | Gets descender value. |
| getDescender(double fontSize) | Returns descender for specific Font size. |
| getFontBBox() | Gets FontBBox value. |
| getFontMatrix() | Gets FontBBox value. |
| getGlyphBBox(GlyphId glyphId) | Returns glyph Bbox. |
| getGlyphWidth(GlyphId glyphId) | Returns glyphs width by glyph id. |
| getKerningValue(GlyphId prevGlyphId, GlyphId nextGlyphId) | Returns kerning value for the glyph pair. |
| getLineGap() | Gets LineGap value. |
| getTypoAscender() | Gets TypoAscender value. |
| getTypoAscender(double fontSize) | Returns typographic ascender for specific Font size. |
| getTypoDescender() | Gets TypoDescender value. |
| getTypoDescender(double fontSize) | Returns typographic descender for specific font size |
| getTypoLineGap() | Gets TypoLineGap value. |
| getTypoLineGap(double fontSize) | Returns line gap for specific Font size. |
| getUnitsPerEM() | Gets UnitsPerEM value. |
| hashCode() | |
| isFixedPitch() | Gets IsFixedPitch value. |
| measureString(String unicode, double fontSize) | Measures string and returns string width. |
| measureString(long[] charCodes, double fontSize) | Measures text represented as array of character codes and returns string width. |
| notify() | |
| notifyAll() | |
| setAscender(double value) | Sets ascender value. |
| setDescender(double value) | Sets descender value. |
| setTypoAscender(double value) | Sets TypoAscender value. |
| setTypoDescender(double value) | Sets TypoDescender value. |
| setUnitsPerEM(long value) | |
| toString() | |
| wait() | |
| wait(long arg0) | |
| wait(long arg0, int arg1) |
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
getFontMatrix()
public TransformationMatrix getFontMatrix()
Gets FontBBox value.
Returns: TransformationMatrix
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 glyphs width by glyph id.
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
hashCode()
public native int hashCode()
Returns: int
isFixedPitch()
public boolean isFixedPitch()
Gets IsFixedPitch value.
Returns: boolean - IsFixedPitch value.
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.
measureString(long[] charCodes, double fontSize)
public double measureString(long[] charCodes, double fontSize)
Measures text represented as array of character codes and returns string width.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| charCodes | long[] | Text string represented as array of character codes. |
| 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 |
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 |