Class FontRecord
Font Record describes a font in the workbook (index = 0-3,5-infinity - skip 4) An element in the Font Table contains information about a used font, including character formatting.
Inheritance
Namespace: Syncfusion.XlsIO.Parser.Biff_Records
Assembly: Syncfusion.XlsIO.Base.dll
Syntax
[Biff]
public class FontRecord : BiffRecordRaw, ICloneable, IBiffStorage
Constructors
FontRecord()
Default constructor
Declaration
public FontRecord()
FontRecord(Int32)
Reserved for record's internal data array.
Declaration
public FontRecord(int iReserve)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iReserve | Amount of bytes for data array. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | If amount of bytes requested is less than zero. |
FontRecord(Stream, out Int32)
Read / initialize constructor.
Declaration
public FontRecord(Stream stream, out int itemSize)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | Stream from which record data should be read. |
System.Int32 | itemSize | Size of read item. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If stream is not specified. |
System.ApplicationException | If stream does not support read or seek operations. |
Fields
DefaultFontColor
Default font color.
Declaration
public const int DefaultFontColor = 32767
Field Value
Type |
---|
System.Int32 |
Properties
Attributes
Read-only. Font attributes.
Declaration
public ushort Attributes { get; }
Property Value
Type |
---|
System.UInt16 |
Baseline
Gets or sets the baseline value which indicates whether superscript or subscript
Declaration
public int Baseline { get; set; }
Property Value
Type |
---|
System.Int32 |
BoldWeight
Boldness (100-1000). Standard values are 0190H (400) for normal text and 02BCH (700) for bold text.
Declaration
public ushort BoldWeight { get; set; }
Property Value
Type |
---|
System.UInt16 |
Charset
Character set:
Declaration
public byte Charset { get; set; }
Property Value
Type |
---|
System.Byte |
Family
Font family:
Declaration
public byte Family { get; set; }
Property Value
Type |
---|
System.Byte |
FontHeight
Height of the font (in twips = 1/20 of a point).
Declaration
public ushort FontHeight { get; set; }
Property Value
Type |
---|
System.UInt16 |
FontName
Font name: Unicode string, 8-bit string length.
Declaration
public string FontName { get; set; }
Property Value
Type |
---|
System.String |
IsItalic
True if characters are italic.
Declaration
public bool IsItalic { get; set; }
Property Value
Type |
---|
System.Boolean |
IsMacOutline
Whether to use the Mac outline font style (Mac only).
Declaration
public bool IsMacOutline { get; set; }
Property Value
Type |
---|
System.Boolean |
IsMacShadow
Whether to use the Mac shadow font style thing (Mac only).
Declaration
public bool IsMacShadow { get; set; }
Property Value
Type |
---|
System.Boolean |
IsStrikeout
True if characters are strikeout.
Declaration
public bool IsStrikeout { get; set; }
Property Value
Type |
---|
System.Boolean |
MinimumRecordSize
Read-only. Returns minimum possible size of record's internal data array.
Declaration
public override int MinimumRecordSize { get; }
Property Value
Type |
---|
System.Int32 |
Overrides
PaletteColorIndex
Palette color index.
Declaration
public ushort PaletteColorIndex { get; set; }
Property Value
Type |
---|
System.UInt16 |
Reserved
Not used.
Declaration
public byte Reserved { get; }
Property Value
Type |
---|
System.Byte |
SuperSubscript
Escapement:
Declaration
public ExcelFontVertialAlignment SuperSubscript { get; set; }
Property Value
Type |
---|
ExcelFontVertialAlignment |
Underline
Underline type:
Declaration
public ExcelUnderline Underline { get; set; }
Property Value
Type |
---|
ExcelUnderline |
Methods
CompareTo(FontRecord)
Declaration
public int CompareTo(FontRecord record)
Parameters
Type | Name | Description |
---|---|---|
FontRecord | record |
Returns
Type |
---|
System.Int32 |
CopyTo(BiffRecordRaw)
Declaration
public override void CopyTo(BiffRecordRaw raw)
Parameters
Type | Name | Description |
---|---|---|
Syncfusion.XlsIO.Parser.Biff_Records.BiffRecordRaw | raw |
Overrides
Equals(Object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
System.Boolean | True if the specified object is equal to the current object; otherwise False. |
GetHashCode()
Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A hash code for the current object. |
GetStoreSize(ExcelVersion)
Size of the required storage space. Read-only.
Declaration
public override int GetStoreSize(ExcelVersion version)
Parameters
Type | Name | Description |
---|---|---|
ExcelVersion | version |
Returns
Type |
---|
System.Int32 |
Overrides
ParseStructure(DataProvider, Int32, Int32, ExcelVersion)
Parse structure of record. Converts data buffer to special values according to record specification.
Declaration
public override void ParseStructure(DataProvider provider, int iOffset, int iLength, ExcelVersion version)
Parameters
Type | Name | Description |
---|---|---|
DataProvider | provider | Object that provides access to the data. |
System.Int32 | iOffset | Offset to the record's data. |
System.Int32 | iLength | Length of the record's data. |
ExcelVersion | version | Excel version used for infill. |
Overrides
Exceptions
Type | Condition |
---|---|
WrongBiffRecordDataException | If there is any internal error. |