Package org.apache.poi.hslf.record
Class FontEmbeddedData
- java.lang.Object
-
- org.apache.poi.hslf.record.Record
-
- org.apache.poi.hslf.record.RecordAtom
-
- org.apache.poi.hslf.record.FontEmbeddedData
-
- All Implemented Interfaces:
FontFacet,GenericRecord
public class FontEmbeddedData extends RecordAtom implements FontFacet
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetFontData()FontHeadergetFontHeader()Read the font data.java.util.Map<java.lang.String,java.util.function.Supplier<?>>getGenericProperties()static intgetMaxRecordLength()longgetRecordType()Returns the type (held as a little endian in bytes 3 and 4) that this class handlesjava.lang.StringgetTypeface()intgetWeight()Get the font weight.booleanisItalic()voidsetFontData(byte[] fontData)Overwrite the font data.static voidsetMaxRecordLength(int length)voidwriteOut(java.io.OutputStream out)Have the contents printer out into an OutputStream, used when writing a file back out to disk (Normally, atom classes will keep their bytes around, but non atom classes will just request the bytes from their children, then chuck on their header and return)-
Methods inherited from class org.apache.poi.hslf.record.RecordAtom
getChildRecords, isAnAtom
-
Methods inherited from class org.apache.poi.hslf.record.Record
buildRecordAtOffset, createRecordForType, findChildRecords, getGenericChildren, getGenericRecordType, writeLittleEndian, writeLittleEndian
-
-
-
-
Method Detail
-
setMaxRecordLength
public static void setMaxRecordLength(int length)
- Parameters:
length- the max record length allowed for FontEmbeddedData
-
getMaxRecordLength
public static int getMaxRecordLength()
- Returns:
- the max record length allowed for FontEmbeddedData
-
getRecordType
public long getRecordType()
Description copied from class:RecordReturns the type (held as a little endian in bytes 3 and 4) that this class handles- Specified by:
getRecordTypein classRecord
-
writeOut
public void writeOut(java.io.OutputStream out) throws java.io.IOExceptionDescription copied from class:RecordHave the contents printer out into an OutputStream, used when writing a file back out to disk (Normally, atom classes will keep their bytes around, but non atom classes will just request the bytes from their children, then chuck on their header and return)
-
setFontData
public void setFontData(byte[] fontData)
Overwrite the font data. Reading values from this FontEmbeddedData instance while calling setFontData is not thread safe.- Parameters:
fontData- new font data
-
getFontHeader
public FontHeader getFontHeader()
Read the font data. Reading values from this FontEmbeddedData instance while callingsetFontData(byte[])is not thread safe.- Returns:
- font data
-
getWeight
public int getWeight()
Description copied from interface:FontFacetGet the font weight.The weight of the font in the range 0 through 1000. For example, 400 is normal and 700 is bold. If this value is zero, a default weight is used.
-
isItalic
public boolean isItalic()
-
getTypeface
public java.lang.String getTypeface()
-
getFontData
public java.lang.Object getFontData()
- Specified by:
getFontDatain interfaceFontFacet- Returns:
- the wrapper object holding the font data
-
getGenericProperties
public java.util.Map<java.lang.String,java.util.function.Supplier<?>> getGenericProperties()
- Specified by:
getGenericPropertiesin interfaceGenericRecord
-
-