CffFontMetrics

Inheritance: java.lang.Object, com.aspose.font.FontMetrics

public class CffFontMetrics extends FontMetrics

CFF 字体度量实现

方法

方法描述
equals(Object arg0)
getAscender()获取 Ascender 值。
getAscender(double fontSize)返回特定字体大小的 ascender。
getClass()
getDescender()获取 Descender 值。
getDescender(double fontSize)返回特定字体大小的 descender。
getFontBBox()获取 FontBBox 值。
getFontMatrix()获取 FontMatrix 值。
getFontMatrixForGlyph(GlyphId glyphId)计算由 ID 指定的字形的变换矩阵。
getGlyphBBox(GlyphId glyphId)返回字形 Bbox。
getGlyphWidth(GlyphId glyphId)返回字形宽度。
getKerningValue(GlyphId prevGlyphId, GlyphId nextGlyphId)返回字形对的字距值。
getLineGap()获取 LineGap 值。
getTypoAscender()获取 TypoAscender 值。
getTypoAscender(double fontSize)返回特定 Font 大小的排版上升线。
getTypoDescender()获取 TypoDescender 值。
getTypoDescender(double fontSize)返回特定字体大小的排版下降线
getTypoLineGap()获取 TypoLineGap 值。
getTypoLineGap(double fontSize)返回特定 Font 大小的行间距。
getUnitsPerEM()获取 UnitsPerEM 值。
hashCode()
isFixedPitch()获取 IsFixedPitch 值。
measureString(String unicode, double fontSize)测量字符串并返回字符串宽度。
notify()
notifyAll()
setAscender(double value)设置 Ascender 值。
setDescender(double value)设置 Descender 值。
setGlyphWidth(GlyphId glyphId, double value)
setTypoAscender(double value)设置 TypoAscender 值。
setTypoDescender(double value)设置 TypoDescender 值。
setUnitsPerEM(long value)设置 UnitsPerEM 值。
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

参数类型描述
arg0java.lang.Object

Returns: boolean

getAscender()

public double getAscender()

获取 Ascender 值。

Returns: double - Ascender 值。

getAscender(double fontSize)

public double getAscender(double fontSize)

返回特定字体大小的 ascender。

Parameters:

参数类型描述
fontSizedouble字体大小。

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:

参数类型描述
fontSizedouble字体大小。

Returns: double - Descender 值。

getFontBBox()

public FontBBox getFontBBox()

获取 FontBBox 值。

Returns: FontBBox - FontBBox value.

getFontMatrix()

public TransformationMatrix getFontMatrix()

获取 FontMatrix 值。

Returns: TransformationMatrix - FontMatrix value.

getFontMatrixForGlyph(GlyphId glyphId)

public TransformationMatrix getFontMatrixForGlyph(GlyphId glyphId)

计算由 ID 指定的字形的变换矩阵。

Parameters:

参数类型描述
glyphIdGlyphId字形标识符。

Returns: TransformationMatrix - Glyph transformation matrix.

getGlyphBBox(GlyphId glyphId)

public FontBBox getGlyphBBox(GlyphId glyphId)

返回字形 Bbox。 如果字形未定义 BBox,则返回 FontBBox。 可能会被特定字体编码的继承者覆盖。

Parameters:

参数类型描述
glyphIdGlyphId字形标识符。

Returns: FontBBox - Glyph BBox.

getGlyphWidth(GlyphId glyphId)

public double getGlyphWidth(GlyphId glyphId)

返回字形宽度。可能会被特定字体编码的继承者覆盖。

Parameters:

参数类型描述
glyphIdGlyphId字形标识符。

Returns: double - 字形宽度。

getKerningValue(GlyphId prevGlyphId, GlyphId nextGlyphId)

public double getKerningValue(GlyphId prevGlyphId, GlyphId nextGlyphId)

返回字形对的字距值。

Parameters:

参数类型描述
prevGlyphIdGlyphId对中的第一个字形。
nextGlyphIdGlyphId字体大小。

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:

参数类型描述
fontSizedouble字体大小。

Returns: double - 排版上升线值。

getTypoDescender()

public double getTypoDescender()

获取 TypoDescender 值。

Returns: double - TypoDescender 值。

getTypoDescender(double fontSize)

public double getTypoDescender(double fontSize)

返回特定字体大小的排版下降线

param fontSize 字体大小。

Parameters:

参数类型描述
fontSizedouble

Returns: double - 排版下降线值。

getTypoLineGap()

public double getTypoLineGap()

获取 TypoLineGap 值。

Returns: double - TypoLineGap 值。

getTypoLineGap(double fontSize)

public double getTypoLineGap(double fontSize)

返回特定 Font 大小的行间距。

Parameters:

参数类型描述
fontSizedouble字体大小。

Returns: double - 行间隙值。

getUnitsPerEM()

public long getUnitsPerEM()

获取 UnitsPerEM 值。

Returns: long - UnitsPerEM 值。

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:

参数类型描述
unicodejava.lang.StringUnicode 字符串。
fontSizedouble字体大小。

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)

设置 Descender 值。

Parameters:

参数类型描述
double下降线值。

setGlyphWidth(GlyphId glyphId, double value)

public void setGlyphWidth(GlyphId glyphId, double value)

设置字形宽度。

Parameters:

参数类型描述
glyphIdGlyphId
double

setTypoAscender(double value)

public void setTypoAscender(double value)

设置 TypoAscender 值。

Parameters:

参数类型描述
doubleTypoAscender 值。

setTypoDescender(double value)

public void setTypoDescender(double value)

设置 TypoDescender 值。

Parameters:

参数类型描述
doubleTypoDescender 值。

setUnitsPerEM(long value)

public void setUnitsPerEM(long value)

设置 UnitsPerEM 值。

Parameters:

参数类型描述
longUnitsPerEM 值。

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

参数类型描述
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

参数类型描述
arg0long
arg1int