public class TrueTypeCollection extends Object
| 构造器和说明 |
|---|
TrueTypeCollection() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
foreach(Consumer<TrueTypeFont> cn)
遍历字体集合中的所有字体
|
TrueTypeFont |
getFontAtIndex(int idx)
通过字体索引获取字体
|
int |
getNumFonts()
字体总数
|
TrueTypeCollection |
parse(TTFDataStream stream)
Creates a new TrueTypeCollection from a TTC stream.
|
public TrueTypeCollection parse(TTFDataStream stream) throws IOException
stream - The TTF file.IOException - If the font could not be parsed.public TrueTypeFont getFontAtIndex(int idx) throws IOException
idx - 索引号IOException - IOEpublic void foreach(Consumer<TrueTypeFont> cn) throws IOException
cn - 字体集合IOException - IOEpublic int getNumFonts()
Copyright © 2024. All rights reserved.