public final class FontRecord extends StandardRecord
| Modifier and Type | Field and Description |
|---|---|
static short |
sid |
static short |
SS_NONE |
static short |
SS_SUB |
static short |
SS_SUPER |
static byte |
U_DOUBLE |
static byte |
U_DOUBLE_ACCOUNTING |
static byte |
U_NONE |
static byte |
U_SINGLE |
static byte |
U_SINGLE_ACCOUNTING |
| Constructor and Description |
|---|
FontRecord() |
FontRecord(FontRecord other) |
FontRecord(RecordInputStream in) |
| Modifier and Type | Method and Description |
|---|---|
void |
cloneStyleFrom(FontRecord source)
Clones all the font style information from another
FontRecord, onto this one.
|
FontRecord |
copy() |
boolean |
equals(java.lang.Object o) |
short |
getAttributes()
get the font attributes (see individual bit getters that reference this method)
|
short |
getBoldWeight()
get the bold weight for this font (100-1000dec or 0x64-0x3e8).
|
byte |
getCharset()
get the character set
|
short |
getColorPaletteIndex()
get the font's color palette index
|
protected int |
getDataSize() |
byte |
getFamily()
get the font family (TODO)
|
short |
getFontHeight()
gets the height of the font in 1/20th point units
|
java.lang.String |
getFontName()
get the name of the font
|
java.util.Map<java.lang.String,java.util.function.Supplier<?>> |
getGenericProperties() |
HSSFRecordTypes |
getGenericRecordType() |
short |
getSid()
return the non static version of the id for this record.
|
short |
getSuperSubScript()
get the type of super or subscript for the font
|
byte |
getUnderline()
get the type of underlining for the font
|
int |
hashCode() |
boolean |
isItalic()
get whether the font is to be italics or not
|
boolean |
isMacoutlined()
whether to use the mac outline font style thing (mac only) - Some mac person
should comment this instead of me doing it (since I have no idea)
|
boolean |
isMacshadowed()
whether to use the mac shado font style thing (mac only) - Some mac person
should comment this instead of me doing it (since I have no idea)
|
boolean |
isStruckout()
get whether the font is to be stricken out or not
|
boolean |
sameProperties(FontRecord other)
Does this FontRecord have all the same font
properties as the supplied FontRecord?
Note that
equals(Object) will check
for exact objects, while this will check
for exact contents, because normally the
font record's position makes a big
difference too. |
void |
serialize(LittleEndianOutput out)
Write the data content of this BIFF record.
|
void |
setAttributes(short attributes)
set the font attributes (see individual bit setters that reference this method)
|
void |
setBoldWeight(short bw)
set the bold weight for this font (100-1000dec or 0x64-0x3e8).
|
void |
setCharset(byte charset)
set the character set
|
void |
setColorPaletteIndex(short cpi)
set the font's color palette index
|
void |
setFamily(byte f)
set the font family (TODO)
|
void |
setFontHeight(short height)
sets the height of the font in 1/20th point units
|
void |
setFontName(java.lang.String fn)
set the name of the font
|
void |
setItalic(boolean italics)
set the font to be italics or not
|
void |
setMacoutline(boolean mac)
whether to use the mac outline font style thing (mac only) - Some mac person
should comment this instead of me doing it (since I have no idea)
|
void |
setMacshadow(boolean mac)
whether to use the mac shado font style thing (mac only) - Some mac person
should comment this instead of me doing it (since I have no idea)
|
void |
setStrikeout(boolean strike)
set the font to be stricken out or not
|
void |
setSuperSubScript(short sss)
set the type of super or subscript for the font
|
void |
setUnderline(byte u)
set the type of underlining for the font
|
getRecordSize, serializecloneViaReserialise, serialize, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetGenericChildrenpublic static final short sid
public static final short SS_NONE
public static final short SS_SUPER
public static final short SS_SUB
public static final byte U_NONE
public static final byte U_SINGLE
public static final byte U_DOUBLE
public static final byte U_SINGLE_ACCOUNTING
public static final byte U_DOUBLE_ACCOUNTING
public FontRecord()
public FontRecord(FontRecord other)
public FontRecord(RecordInputStream in)
public void setFontHeight(short height)
height - fontheight (in points/20)public void setAttributes(short attributes)
attributes - the bitmask to setpublic void setItalic(boolean italics)
italics - - whether the font is italics or notsetAttributes(short)public void setStrikeout(boolean strike)
strike - - whether the font is stricken out or notsetAttributes(short)public void setMacoutline(boolean mac)
mac - - whether to do that mac font outline thing or notsetAttributes(short)public void setMacshadow(boolean mac)
mac - - whether to do that mac font shadow thing or notsetAttributes(short)public void setColorPaletteIndex(short cpi)
cpi - - font color indexpublic void setBoldWeight(short bw)
bw - - a number between 100-1000 for the fonts "boldness"public void setSuperSubScript(short sss)
public void setUnderline(byte u)
u - super or subscript optionU_NONE,
U_SINGLE,
U_DOUBLE,
U_SINGLE_ACCOUNTING,
U_DOUBLE_ACCOUNTINGpublic void setFamily(byte f)
f - familypublic void setCharset(byte charset)
charset - - character setpublic void setFontName(java.lang.String fn)
fn - - name of the font (i.e. "Arial")public short getFontHeight()
public short getAttributes()
public boolean isItalic()
getAttributes()public boolean isStruckout()
getAttributes()public boolean isMacoutlined()
getAttributes()public boolean isMacshadowed()
getAttributes()public short getColorPaletteIndex()
public short getBoldWeight()
public short getSuperSubScript()
public byte getUnderline()
U_NONE,
U_SINGLE,
U_DOUBLE,
U_SINGLE_ACCOUNTING,
U_DOUBLE_ACCOUNTINGpublic byte getFamily()
public byte getCharset()
public java.lang.String getFontName()
public void serialize(LittleEndianOutput out)
StandardRecord
The number of bytes written must equal the record size reported by
RecordBase.getRecordSize()} minus four (
record header consisting of a 'ushort sid' and 'ushort reclength' has
already been written by their superclass).
serialize in class StandardRecordout - the output objectprotected int getDataSize()
getDataSize in class StandardRecordpublic short getSid()
Recordpublic void cloneStyleFrom(FontRecord source)
source - the record to clone the properties frompublic int hashCode()
hashCode in class java.lang.Objectpublic boolean sameProperties(FontRecord other)
equals(Object) will check
for exact objects, while this will check
for exact contents, because normally the
font record's position makes a big
difference too.other - the record to compare withpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic FontRecord copy()
copy in interface Duplicatablecopy in class StandardRecordpublic HSSFRecordTypes getGenericRecordType()
getGenericRecordType in interface GenericRecordgetGenericRecordType in class Recordpublic java.util.Map<java.lang.String,java.util.function.Supplier<?>> getGenericProperties()
Copyright 2022 The Apache Software Foundation or its licensors, as applicable.