public final class FontCollection extends RecordContainer
FontCollection
ia a container that holds information
about all the fonts in the presentation._children
Modifier and Type | Method and Description |
---|---|
HSLFFontInfo |
addFont(FontInfo fontInfo)
Add font with the given FontInfo configuration to the font collection.
|
HSLFFontInfo |
addFont(java.io.InputStream fontData) |
HSLFFontInfo |
getFontInfo(int index)
Lookup a FontInfo object by its internal font index
|
HSLFFontInfo |
getFontInfo(java.lang.String typeface)
Lookup a FontInfo object by its typeface
|
HSLFFontInfo |
getFontInfo(java.lang.String typeface,
FontCharset charset)
Lookup a FontInfo object by its typeface
|
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
|
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
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 implementationpublic HSLFFontInfo addFont(java.io.InputStream fontData) throws java.io.IOException
java.io.IOException
public HSLFFontInfo getFontInfo(java.lang.String typeface)
typeface
- the full font namenull
if not foundpublic HSLFFontInfo getFontInfo(java.lang.String typeface, FontCharset charset)
typeface
- the full font namecharset
- the charsetnull
if not foundpublic HSLFFontInfo getFontInfo(int index)
index
- the internal font indexnull
if not foundpublic int getNumberOfFonts()
public java.util.List<HSLFFontInfo> getFonts()
public java.util.Map<java.lang.String,java.util.function.Supplier<?>> getGenericProperties()
getGenericProperties
in interface GenericRecord
getGenericProperties
in class RecordContainer
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.