Click or drag to resize

XlsFont Class

Represents a font style used in Excel documents, encapsulating properties such as font name, size, color, and style attributes like bold or italic.
Inheritance Hierarchy
System Object
Spire.Xls.Core.Spreadsheet XlsObject
Spire.Xls.Core.Spreadsheet XlsFont
Spire.Xls.Core.Spreadsheet XlsFontStyle

Namespace: Spire.Xls.Core.Spreadsheet
Assembly: Spire.XLS (in Spire.XLS.dll) Version: 15.4.0.0 (15.4.0.5046)
Syntax
public class XlsFont : XlsObject, IFont, 
	IExcelApplication, IOptimizedUpdate, ICloneParent, IDisposable, IComparable

The XlsFont type exposes the following members.

Properties
Name Description
Public property Color
Gets or sets the color of the book.
Public property Font
Returns current font. Read-only.
Public property FontName
Gets or sets the name of the font.
Public property IsAutoColor
Gets a value indicating whether the color is automatically determined.
Public property IsBold
Gets or sets a value indicating whether the font is bold.
Public property IsItalic
Gets or sets a value indicating whether the font is italic.
Public property IsStrikethrough
Gets or sets a value indicating whether the text is displayed with a strikethrough.
Public property IsSubscript
Gets or sets a value indicating whether the font is subscript.
Public property IsSuperscript
Gets or sets a value indicating whether the font is superscript.
Public property KnownColor
Gets or sets the known color of the font.
Protected property MacOSOutlineFont
True if the font is an outline font. Read/write Boolean.
Protected property MacOSShadow
True if the font is a shadow font or if the object has a shadow. Read/write Boolean.
Public property OColor
Returns color object.
Public property Parent
Reference to Parent object. Read-only.
(Inherited from XlsObject .)
Protected property ReferenceCount
Get quantity of instance references.
(Inherited from XlsObject .)
Public property Scheme
Gets or sets the scheme used for font conversion.
Public property Size
Gets or sets the size of the font.
Public property StrikethroughType
Gets or sets the type of strikethrough applied to the text.
Public property Underline
Gets or sets the underline style of the font.
Public property VerticalAlignment
Gets or sets the vertical alignment of the font.
Top
Methods
Name Description
Protected method AddReference
Increase the quantity of reference. User must use this method when new wrapper on object is created or reference on object stored.
(Inherited from XlsObject .)
Public method BeginUpdate
This method should be called before several updates to the object will take place.
Protected method CheckDisposed
Checks whether object was disposed and throws exception if it was.
(Inherited from XlsObject .)
Public method Clone
Creates a clone of the current XlsFont object with the specified parent.
Public method CompareTo
Compares the current instance with another object of the same type.
Public method Dispose
Dispose object and free resources.
(Inherited from XlsObject .)
Public method EndUpdate
This method should be called after several updates to the object took place.
Public method Equals
Determines whether the specified object is equal to the current object.
(Inherited from Object .)
Protected method Finalize
Destructor. Call dispose method of current object.
(Inherited from XlsObject .)
Protected method FindParent(Type)
This method is used to find parent with specific type.
(Inherited from XlsObject .)
Protected method FindParent( Type )
Find parent of object.
(Inherited from XlsObject .)
Protected method FindParent(Type, Boolean)
This method is used to find parent with specific type.
(Inherited from XlsObject .)
Protected method FindParents
Finds parent objects.
(Inherited from XlsObject .)
Public method GenerateNativeFont
Generates a native font if it doesn't already exist, using the current font size.
Public method GenerateNativeFont(Single)
Generates a Font object based on the specified size and the current font settings.
Public method GetHashCode
Serves as the default hash function.
(Inherited from Object .)
Public method GetThemeColor
Get the theme color.
Public method GetType
Gets the Type of the current instance.
(Inherited from Object .)
Public method MeasureString
Measures the size of a string when rendered with the specified font settings.
Protected method MemberwiseClone
Creates a shallow copy of the current Object .
(Inherited from Object .)
Protected method OnDispose
Method which can be overriden by users to take any specific actions when object is disposed.
(Inherited from XlsObject .)
Protected method ReleaseReference
Decrease quantity of Reference. User must call this method when freeing resources.
(Inherited from XlsObject .)
Protected method SetParent
Sets parent of the object.
(Inherited from XlsObject .)
Public method SetThemeColor
Set the theme color.
Public method ToString
Returns a string that represents the current object.
(Inherited from Object .)
Top
Fields
Name Description
Protected field m_bIsDisposed
Flag which indicates if the object was disposed or not.
(Inherited from XlsObject .)
Top
See Also