CffFont

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

public class CffFont extends Font

表示紧凑字体格式 (CFF)。

方法

方法描述
convert(FontType fontType)将 Font 转换为另一种格式。
equals(Object arg0)
getAllGlyphIds()返回 Font 中可用的所有字形 ID 的数组。
getClass()
getCommonFontsSettings()获取 CFF 字体的通用设置。
getEncoding()获取 Font 编码。
getFontDefinition()获取字体定义。
getFontFamily()获取 Font 家族。
getFontName()获取 Font 字体名称。
getFontNames()获取 Font 名称。
getFontSaver()获取 Font 保存功能。
getFontStyle()获取 Font 样式。
getFontType()获取 Font 类型。
getGlyphAccessor()Font 字形访问器。
getGlyphById(GlyphId id)根据字形 ID 返回字形。
getGlyphById(String glyphName)根据字形名称返回字形。
getGlyphById(long id)根据字形 ID 返回字形。
getGlyphIdType()获取字形 ID 类型规范。
getGlyphsForText(String text)获取文本的字形表示。
getIndexDataProvider(CffIndexProviderType indexType)获取指定 CFF INDEX 结构类型的提供程序。
getMetrics()获取 Font 度量。
getNumGlyphs()获取字体中的字形数量。
getPostscriptNames()获取 PostScript 字体名称。
getStyle()获取 Font 样式。
getTopDictDataProvider()
hashCode()
isCidKeyedFont()获取指示字体为 cid-keyed 的值。
notify()
notifyAll()
open(FontDefinition fontDefinition)打开字体,使用 FontDefinition 对象。
open(FontType fontType, byte[] fontData)打开字体,使用字体类型和字体数据字节数组。
open(FontType fontType, StreamSource fontStreamSource)打开字体,使用字体类型和流源。
open(FontType fontType, String fileName)打开字体,使用字体类型和字体文件名。
save(OutputStream stream)将字体保存为原始格式。
save(String fileName)将字体保存为原始格式。
saveToFormat(OutputStream stream, FontSavingFormats outFormat)将字体保存为指定格式。
setCommonFontsSettings(CffFontsSettings value)指定 CFF 字体的通用设置。
setFontFamily(String value)字体族的设置器尚未实现。
setFontName(String value)字体面名称的设置器尚未实现。
setStyle(String value)样式的设置器尚未实现。
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

convert(FontType fontType)

public Font convert(FontType fontType)

将字体转换为其他格式。注意:目前仅支持 TTF 字体类型。

Parameters:

参数类型描述
fontTypeFontType要转换成的字体格式类型。

Returns: Font - Font converted into new format.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

参数类型描述
arg0java.lang.Object

Returns: boolean

getAllGlyphIds()

public GlyphId[] getAllGlyphIds()

返回字体中所有可用字形 ID 的数组。字形 ID 是字形的唯一编号,取决于字体类型。CFF 字体的字形 ID 可以是 ( GlyphStringId ) 类的实例或 ( GlyphUInt32Id ) 类的实例。

Returns: com.aspose.font.GlyphId[]

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getCommonFontsSettings()

public CffFontsSettings getCommonFontsSettings()

获取 CFF 字体的通用设置。这些设置在不同场景中使用,并且可以针对每个单独的字体进行更改。

Returns: CffFontsSettings - Font definition.

getEncoding()

public IFontEncoding getEncoding()

获取 Font 编码。

Returns: IFontEncoding - Font encoding.

getFontDefinition()

public FontDefinition getFontDefinition()

获取字体定义。

Returns: FontDefinition - Font definition.

getFontFamily()

public String getFontFamily()

获取 Font 家族。

Returns: java.lang.String - 字体族。

getFontName()

public String getFontName()

获取 Font 字体名称。

Returns: java.lang.String - 字体面名称。

getFontNames()

public MultiLanguageString getFontNames()

获取 Font 名称。

Returns: MultiLanguageString - Font names.

getFontSaver()

public IFontSaver getFontSaver()

获取 Font 保存功能。

Returns: IFontSaver - Font save functionality.

getFontStyle()

public int getFontStyle()

获取字体样式。这是一个在通用类型中计算并表示的值。

Returns: int - 字体样式。通常是 FontStyle 类常量标志值的组合或 0。

getFontType()

public FontType getFontType()

获取字体类型。返回 FontType.CFF 值。

Returns: FontType - Font type.

getGlyphAccessor()

public IGlyphAccessor getGlyphAccessor()

字体字形访问器。检索字形及其标识符。

Returns: IGlyphAccessor - Font glyph accessor.

getGlyphById(GlyphId id)

public Glyph getGlyphById(GlyphId id)

根据字形 ID 返回字形。字形 ID 是字形的唯一编号,取决于字体类型。CFF 字体的字形 ID 可以是 ( GlyphStringId ) 类的实例或 ( GlyphInt32Id ) 类的实例。

Parameters:

参数类型描述
idGlyphId字形 ID。

Returns: Glyph - Glyph.

getGlyphById(String glyphName)

public Glyph getGlyphById(String glyphName)

根据字形名称返回字形。

Parameters:

参数类型描述
glyphNamejava.lang.String字形名称。

Returns: Glyph - Glyph.

getGlyphById(long id)

public Glyph getGlyphById(long id)

根据字形 ID 返回字形。

Parameters:

参数类型描述
idlong字形 ID。

Returns: Glyph - Glyph.

getGlyphIdType()

public GlyphIdType getGlyphIdType()

获取字形 ID 类型规范。

Returns: GlyphIdType - Glyph id type specification.

getGlyphsForText(String text)

public GlyphId[] getGlyphsForText(String text)

获取文本的字形表示。

Parameters:

参数类型描述
textjava.lang.String输入文本。

Returns: com.aspose.font.GlyphId[] - GlyphId 数组。

getIndexDataProvider(CffIndexProviderType indexType)

public ICffIndexDataProvider getIndexDataProvider(CffIndexProviderType indexType)

获取指定 CFF INDEX 结构类型的提供程序。

Parameters:

参数类型描述
indexTypeCffIndexProviderTypeINDEX 结构的类型。

Returns: ICffIndexDataProvider - Implementation of ( ICffIndexDataProvider ) interface.

getMetrics()

public IFontMetrics getMetrics()

获取 Font 度量。

Returns: IFontMetrics - Font metrics.

getNumGlyphs()

public int getNumGlyphs()

获取字体中的字形数量。

Returns: int - 字体中的字形数量。

getPostscriptNames()

public MultiLanguageString getPostscriptNames()

获取 PostScript 字体名称。

Returns: MultiLanguageString - Postscript Font names.

getStyle()

public String getStyle()

获取字体样式。这是字体文件提供的原始字符串值。

Returns: java.lang.String - 字体样式。

getTopDictDataProvider()

public TopDictDataProvider getTopDictDataProvider()

Returns: TopDictDataProvider

hashCode()

public native int hashCode()

Returns: int

isCidKeyedFont()

public boolean isCidKeyedFont()

获取指示字体为 cid-keyed 的值。

Returns: boolean - 指示字体为 cid-keyed 的值。

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

open(FontDefinition fontDefinition)

public static Font open(FontDefinition fontDefinition)

打开字体,使用 FontDefinition 对象。

Parameters:

参数类型描述
fontDefinitionFontDefinition字体定义对象。

Returns: Font - Font loaded.

open(FontType fontType, byte[] fontData)

public static Font open(FontType fontType, byte[] fontData)

打开字体,使用字体类型和字体数据字节数组。

Parameters:

参数类型描述
fontTypeFontType字体类型。
fontDatabyte[]用于加载字体的字节数组。

Returns: Font - Font loaded.

open(FontType fontType, StreamSource fontStreamSource)

public static Font open(FontType fontType, StreamSource fontStreamSource)

打开字体,使用字体类型和流源。

Parameters:

参数类型描述
fontTypeFontType字体类型。
fontStreamSourceStreamSource字体的流来源。

Returns: Font - Font loaded.

open(FontType fontType, String fileName)

public static Font open(FontType fontType, String fileName)

打开字体,使用字体类型和字体文件名。

Parameters:

参数类型描述
fontTypeFontType字体类型。
文件名java.lang.String字体文件名。

Returns: Font - Font loaded.

save(OutputStream stream)

public void save(OutputStream stream)

将字体保存为原始格式。


Note: following Font types are supported for saving:
 New TTF fonts;
 TTF Font subsets;
 CFF Font subsets;
 Type1 Font subsets.

Parameters:

参数类型描述
java.io.OutputStream用于保存字体的流。

save(String fileName)

public void save(String fileName)

将字体保存为原始格式。


Note: following Font types are supported for saving:
 New TTF fonts;
 TTF Font subsets;
 CFF Font subsets;
 Type1 Font subsets.

Parameters:

参数类型描述
文件名java.lang.String用于保存字体的文件。

saveToFormat(OutputStream stream, FontSavingFormats outFormat)

public void saveToFormat(OutputStream stream, FontSavingFormats outFormat)

将字体保存为指定格式。

Parameters:

参数类型描述
java.io.OutputStream用于保存字体的流
outFormatFontSavingFormats期望的格式

setCommonFontsSettings(CffFontsSettings value)

public void setCommonFontsSettings(CffFontsSettings value)

指定 CFF 字体的通用设置。

Parameters:

参数类型描述
valueCffFontsSettings字体定义。

setFontFamily(String value)

public void setFontFamily(String value)

字体族的设置器尚未实现。

Parameters:

参数类型描述
java.lang.String新的字体族。

setFontName(String value)

public void setFontName(String value)

字体面名称的设置器尚未实现。

Parameters:

参数类型描述
java.lang.String新的字体面名称。

setStyle(String value)

public void setStyle(String value)

样式的设置器尚未实现。

Parameters:

参数类型描述
java.lang.String新的字体样式。

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