TtfFontMetrics
Inheritance: java.lang.Object, com.aspose.font.FontMetrics
public class TtfFontMetrics extends FontMetrics
表示 TTF 字体度量。
方法
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| arg0 | java.lang.Object |
Returns: boolean
getAscender()
public double getAscender()
获取 ascender 值。
Returns: double - Ascender 值。
getAscender(double fontSize)
public double getAscender(double fontSize)
返回特定字体大小的 ascender。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| fontSize | double | 字体大小。 |
Returns: double - Ascender 值。
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getDescender()
public double getDescender()
获取 descender 值。
Returns: double - Descender 值。
getDescender(double fontSize)
public double getDescender(double fontSize)
返回特定字体大小的 descender。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| fontSize | double | 字体大小。 |
Returns: double - Descender 值。
getFontBBox()
public FontBBox getFontBBox()
获取 FontBBox 值。
Returns: FontBBox
getFontMatrix()
public TransformationMatrix getFontMatrix()
获取 FontBBox 值。
Returns: TransformationMatrix
getGlyphBBox(GlyphId glyphId)
public FontBBox getGlyphBBox(GlyphId glyphId)
返回字形 Bbox。 如果字形未定义 BBox,则返回 FontBBox。 可能会被特定字体编码的继承者覆盖。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| glyphId | GlyphId | 字形标识符。 |
Returns: FontBBox - Glyph BBox.
getGlyphWidth(GlyphId glyphId)
public double getGlyphWidth(GlyphId glyphId)
返回按 glyph id 的字形宽度。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| glyphId | GlyphId | 字形标识符。 |
Returns: double - 字形宽度。
getKerningValue(GlyphId prevGlyphId, GlyphId nextGlyphId)
public double getKerningValue(GlyphId prevGlyphId, GlyphId nextGlyphId)
返回字形对的字距值。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| prevGlyphId | GlyphId | 对中的第一个字形。 |
| nextGlyphId | GlyphId | 字体大小。 |
Returns: double - 字距值
getLineGap()
public double getLineGap()
获取 LineGap 值。
Returns: double - 行间距值。
getTypoAscender()
public double getTypoAscender()
获取 TypoAscender 值。
Returns: double - TypoAscender 值。
getTypoAscender(double fontSize)
public double getTypoAscender(double fontSize)
返回特定 Font 大小的排版上升线。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| fontSize | double | 字体大小。 |
Returns: double - 排版上升线值。
getTypoDescender()
public double getTypoDescender()
获取 TypoDescender 值。
Returns: double - TypoDescender 值。
getTypoDescender(double fontSize)
public double getTypoDescender(double fontSize)
返回特定字体大小的排版下降线
param fontSize 字体大小。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| fontSize | double |
Returns: double - 排版下降线值。
getTypoLineGap()
public double getTypoLineGap()
获取 TypoLineGap 值。
Returns: double - TypoLineGap 值。
getTypoLineGap(double fontSize)
public double getTypoLineGap(double fontSize)
返回特定 Font 大小的行间距。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| fontSize | double | 字体大小。 |
Returns: double - 行间隙值。
getUnitsPerEM()
public long getUnitsPerEM()
获取 UnitsPerEM 值。
Returns: long
hashCode()
public native int hashCode()
Returns: int
isFixedPitch()
public boolean isFixedPitch()
获取 IsFixedPitch 值。
Returns: boolean - IsFixedPitch 值。
measureString(String unicode, double fontSize)
public double measureString(String unicode, double fontSize)
测量字符串并返回字符串宽度。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| unicode | java.lang.String | Unicode 字符串。 |
| fontSize | double | 字体大小。 |
Returns: double - 字符串宽度。
measureString(long[] charCodes, double fontSize)
public double measureString(long[] charCodes, double fontSize)
测量表示为字符代码数组的文本并返回字符串宽度。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| charCodes | long[] | 文本字符串表示为字符代码数组。 |
| fontSize | double | 字体大小。 |
Returns: double - 字符串宽度。
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
setAscender(double value)
public void setAscender(double value)
设置 ascender 值。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 值 | double | 上升线值。 |
setDescender(double value)
public void setDescender(double value)
设置下行线值。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 值 | double | 下降线值。 |
setGlyphWidth(GlyphId glyphId, double value)
public void setGlyphWidth(GlyphId glyphId, double value)
设置字形宽度。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| glyphId | GlyphId | 字形标识符。 |
| 值 | double | 新宽度。 |
setTypoAscender(double value)
public void setTypoAscender(double value)
设置 TypoAscender 值。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 值 | double | TypoAscender 值。 |
setTypoDescender(double value)
public void setTypoDescender(double value)
设置 TypoDescender 值。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 值 | double | TypoDescender 值。 |
setUnitsPerEM(long value)
public void setUnitsPerEM(long value)
设置 UnitsPerEM 值。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 值 | 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:
| 参数 | 类型 | 描述 |
|---|---|---|
| arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| arg0 | long | |
| arg1 | int |