public final class FontCollection extends RecordContainer
FontCollection
ia a container that holds information
about all the fonts in the presentation._children
Modifier | Constructor and Description |
---|---|
protected |
FontCollection(byte[] source,
int start,
int len) |
Modifier and Type | Method and Description |
---|---|
HSLFFontInfo |
addFont(FontInfo fontInfo)
Add font with the given FontInfo configuration to the font collection.
|
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
|
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, moveChildBefore, moveChildrenAfter, moveChildrenBefore, removeChild, setChildRecord, writeOut
buildRecordAtOffset, createRecordForType, findChildRecords, 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 getFontInfo(java.lang.String typeface)
typeface
- the full font namenull
if not foundpublic HSLFFontInfo getFontInfo(int index)
index
- the internal font indexnull
if not foundpublic int getNumberOfFonts()
Copyright 2018 The Apache Software Foundation or its licensors, as applicable.