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 中的所有字体样式信息克隆到这个上。)
|
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).
(获取此字体的粗体粗细(100-1000dec 或 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)
(获取字体系列(TODO))
|
short |
getFontHeight()
gets the height of the font in 1/20th point units
(以 1/20 点为单位获取字体高度)
|
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.
(返回此记录的 id 的非静态版本。)
|
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)
(是否使用 mac 轮廓字体样式的东西(仅限 mac) - 一些 mac 人应该评论这个而不是我这样做(因为我不知道))
|
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)
(是否使用 mac shado 字体样式的东西(仅限 mac) - 一些 mac 人应该评论这个而不是我这样做(因为我不知道))
|
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.
(此 FontRecord 是否具有与提供的 FontRecord 相同的字体属性?请注意,equals(Object) 将检查确切的对象,而这将检查确切的内容,因为通常字体记录的位置也会产生很大的不同。)
|
void |
serialize(LittleEndianOutput out)
Write the data content of this BIFF record.
(写入此 BIFF 记录的数据内容。)
|
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).
(设置此字体的粗体粗细(100-1000dec 或 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)
(设置字体系列(TODO))
|
void |
setFontHeight(short height)
sets the height of the font in 1/20th point units
(以 1/20 磅为单位设置字体高度)
|
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)
(是否使用 mac 轮廓字体样式的东西(仅限 mac) - 一些 mac 人应该评论这个而不是我这样做(因为我不知道))
|
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)
(是否使用 mac shado 字体样式的东西(仅限 mac) - 一些 mac 人应该评论这个而不是我这样做(因为我不知道))
|
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, serialize
cloneViaReserialise, serialize, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getGenericChildren
public 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)
(高度 - 字体高度(以磅/20 为单位))
public void setAttributes(short attributes)
attributes
- the bitmask to set
(attributes - 要设置的位掩码)
public void setItalic(boolean italics)
italics
- - whether the font is italics or not
(斜体 - - 字体是否为斜体)
setAttributes(short)
public void setStrikeout(boolean strike)
strike
- - whether the font is stricken out or not
(打击 - - 字体是否被删除)
setAttributes(short)
public void setMacoutline(boolean mac)
mac
- - whether to do that mac font outline thing or not
(mac - 是否做那个mac字体轮廓的事情)
setAttributes(short)
public void setMacshadow(boolean mac)
mac
- - whether to do that mac font shadow thing or not
(mac - 是否做那个mac字体阴影的事情)
setAttributes(short)
public void setColorPaletteIndex(short cpi)
cpi
- - font color index
(cpi - - 字体颜色索引)
public void setBoldWeight(short bw)
bw
- - a number between 100-1000 for the fonts "boldness"
(bw - 字体“粗体”的 100-1000 之间的数字)
public void setSuperSubScript(short sss)
public void setUnderline(byte u)
u
- super or subscript option
(u - 上标或下标选项)
U_NONE
,
U_SINGLE
,
U_DOUBLE
,
U_SINGLE_ACCOUNTING
,
U_DOUBLE_ACCOUNTING
public void setFamily(byte f)
f
- family
(f - 家庭)
public void setCharset(byte charset)
charset
- - character set
(charset - - 字符集)
public void setFontName(java.lang.String fn)
fn
- - name of the font (i.e. "Arial")
(fn - - 字体名称(即“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_ACCOUNTING
public 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
StandardRecord
(在 StandardRecord 类中序列化)
out
- the output object
(out - 输出对象)
protected int getDataSize()
getDataSize
in class
StandardRecord
(类 StandardRecord 中的 getDataSize)
public short getSid()
Record
public void cloneStyleFrom(FontRecord source)
source
- the record to clone the properties from
(source - 从中克隆属性的记录)
public int hashCode()
hashCode
in class
java.lang.Object
public 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.
(此 FontRecord 是否具有与提供的 FontRecord 相同的字体属性?请注意,equals(Object) 将检查确切的对象,而这将检查确切的内容,因为通常字体记录的位置也会产生很大的不同。)
other
- the record to compare with
(other - 要比较的记录)
public boolean equals(java.lang.Object o)
equals
in class
java.lang.Object
public FontRecord copy()
copy
in interface
Duplicatable
(复制到界面 Duplicatable)
copy
in class
StandardRecord
(在 StandardRecord 类中复制)
public HSSFRecordTypes getGenericRecordType()
getGenericRecordType
in interface
GenericRecord
(接口 GenericRecord 中的 getGenericRecordType)
getGenericRecordType
in class
Record
(类 Record 中的 getGenericRecordType)
public java.util.Map<java.lang.String,java.util.function.Supplier<?>> getGenericProperties()
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.