public final class FontCollection extends RecordContainer
FontCollection
ia a container that holds information
about all the fonts in the presentation.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(String typeface)
Lookup a FontInfo object by its typeface
|
int |
getNumberOfFonts() |
long |
getRecordType()
Return the type, which is 2005
|
void |
writeOut(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(OutputStream out) throws IOException
writeOut
in class Record
IOException
public HSLFFontInfo addFont(FontInfo fontInfo)
fontInfo
- the FontInfo configuration, can be a instance of HSLFFontInfo
,
HSLFFontInfoPredefined
or a custom implementationpublic HSLFFontInfo getFontInfo(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 © 2010 - 2020 Adobe. All Rights Reserved