public final class FontCollection extends RecordContainer
FontCollection
ia a container that holds information about all the fonts in the presentation.
(FontCollection 是一个容器,用于保存有关演示文稿中所有字体的信息。)
_children
Modifier and Type | Method and Description |
---|---|
HSLFFontInfo |
addFont(FontInfo fontInfo)
Add font with the given FontInfo configuration to the font collection.
(将具有给定 FontInfo 配置的字体添加到字体集合中。)
|
HSLFFontInfo |
addFont(java.io.InputStream fontData) |
HSLFFontInfo |
getFontInfo(int index)
Lookup a FontInfo object by its internal font index
(通过内部字体索引查找 FontInfo 对象)
|
HSLFFontInfo |
getFontInfo(java.lang.String typeface)
Lookup a FontInfo object by its typeface
(通过字体查找 FontInfo 对象)
|
HSLFFontInfo |
getFontInfo(java.lang.String typeface, FontCharset charset)
Lookup a FontInfo object by its typeface
(通过字体查找 FontInfo 对象)
|
java.util.List<HSLFFontInfo> |
getFonts() |
java.util.Map<java.lang.String,java.util.function.Supplier<?>> |
getGenericProperties() |
int |
getNumberOfFonts() |
long |
getRecordType()
Return the type, which is 2005
(返回类型,即 2005)
|
void |
writeOut(java.io.OutputStream out)
Write the contents of the record back, so it can be written to disk
(将记录的内容写回去,这样就可以写入磁盘了)
|
addChildAfter, addChildBefore, appendChildRecord, findFirstOfType, getChildRecords, handleParentAwareRecords, isAnAtom, removeChild, setChildRecord, writeOut
buildRecordAtOffset, createRecordForType, findChildRecords, getGenericChildren, getGenericRecordType, writeLittleEndian, writeLittleEndian
public long getRecordType()
getRecordType
in class
Record
(类 Record 中的 getRecordType)
public void writeOut(java.io.OutputStream out) throws java.io.IOException
public HSLFFontInfo addFont(FontInfo fontInfo)
fontInfo
- the FontInfo configuration, can be a instance of
HSLFFontInfo
,
HSLFFontInfoPredefined
or a custom implementation
(fontInfo - FontInfo 配置,可以是 HSLFFontInfo、HSLFFontInfoPredefined 或自定义实现的实例)
public HSLFFontInfo addFont(java.io.InputStream fontData) throws java.io.IOException
java.io.IOException
(java.io.IOException)
public HSLFFontInfo getFontInfo(java.lang.String typeface)
typeface
- the full font name
(typeface - 完整的字体名称)
null
if not found
(给定名称的 HSLFFontInfo 或 null 如果未找到)
public HSLFFontInfo getFontInfo(java.lang.String typeface, FontCharset charset)
typeface
- the full font name
(typeface - 完整的字体名称)
charset
- the charset
(charset - 字符集)
null
if not found
(给定名称的 HSLFFontInfo 或 null 如果未找到)
public HSLFFontInfo getFontInfo(int index)
index
- the internal font index
(index - 内部字体索引)
null
if not found
(给定索引的 HSLFFontInfo 或 null 如果未找到)
public int getNumberOfFonts()
public java.util.List<HSLFFontInfo> getFonts()
public java.util.Map<java.lang.String,java.util.function.Supplier<?>> getGenericProperties()
getGenericProperties
in interface
GenericRecord
(接口 GenericRecord 中的 getGenericProperties)
getGenericProperties
in class
RecordContainer
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.