TtfEncoding
Inheritance: java.lang.Object
All Implemented Interfaces: com.aspose.font.IFontEncoding
public class TtfEncoding implements IFontEncoding
表示 TTF 字体编码。
方法
| 方法 | 描述 |
|---|---|
| decodeToGid(long unicode) | TTF Font 的 DecodeToGlyphId 实现会查找 unicode 表并返回 unicode 字符的字形 ID。 |
| decodeToGidParameterized(IEncodingParameters parameters, long charCode) | 参数化版本允许使用特定的 CMap 表(非 unicode)。 |
| encode(long gid, long charCode) | 对字形进行编码。 |
| equals(Object arg0) | |
| getClass() | |
| gidToUnicode(GlyphId glyphId) | 将字形 ID 解码为 unicode。 |
| hashCode() | |
| notify() | |
| notifyAll() | |
| toString() | |
| unicodeToGid(long unicode) | 将 unicode 解码并返回字形 ID。 |
| wait() | |
| wait(long arg0) | |
| wait(long arg0, int arg1) |
decodeToGid(long unicode)
public GlyphId decodeToGid(long unicode)
TTF Font 的 DecodeToGlyphId 实现会查找 unicode 表并返回 unicode 字符的字形 ID。字形 ID 是字形的唯一编号,取决于字体类型。例如:Type1 的 ID 是字形名称,属于 ( GlyphStringId ) 类的实例。TTF 的 ID 是整数索引,属于 ( GlyphUInt32Id ) 类的实例。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| unicode | long | 用于获取字形标识符的字符代码。 |
Returns: GlyphId - Glyph identifier related to character code passed.
decodeToGidParameterized(IEncodingParameters parameters, long charCode)
public GlyphId decodeToGidParameterized(IEncodingParameters parameters, long charCode)
参数化版本允许使用特定的 CMap 表(非 unicode)。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| parameters | IEncodingParameters | IEncodingParameters 接口的实现。 |
| charCode | long | 用于获取字形标识符的字符代码。 |
Returns: GlyphId - Glyph identifier related to character code passed.
encode(long gid, long charCode)
public void encode(long gid, long charCode)
对字形进行编码。对于 TTF 字体,字符代码是 unicode。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| gid | long | 字形标识符。 |
| charCode | long | 字符代码。 |
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| arg0 | java.lang.Object |
Returns: boolean
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
gidToUnicode(GlyphId glyphId)
public long gidToUnicode(GlyphId glyphId)
将字形 ID 解码为 unicode。字形 ID 是字形的唯一编号,取决于字体类型。例如:Type1 的 ID 是字形名称,属于 ( GlyphStringId ) 类的实例。TTF 的 ID 是整数索引,属于 ( GlyphUInt32Id ) 类的实例。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| glyphId | GlyphId | 要解码的符号的 Glyph 标识符。 |
Returns: long - 与传入的 glyph id 相关的 Unicode 值。
hashCode()
public native int hashCode()
Returns: int
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
toString()
public String toString()
Returns: java.lang.String
unicodeToGid(long unicode)
public GlyphId unicodeToGid(long unicode)
将 unicode 解码并返回字形 ID。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| unicode | long | 用于获取字形标识符的 Unicode。 |
Returns: GlyphId - Glyph identifier related to unicode passed.
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 |