Click or drag to resize
NanoXLSX

Font Class

Class representing a Font entry. The Font entry is used to define text formatting
Inheritance Hierarchy
System.Object
  NanoXLSX.Styles.AbstractStyle
    NanoXLSX.Styles.Font

Namespace: NanoXLSX.Styles
Assembly: NanoXLSX (in NanoXLSX.dll) Version: 2.6.2+7f12a949130e0be1e987e553d2d08c083176cdca
Syntax
C#
public class Font : AbstractStyle

The Font type exposes the following members.

Constructors
 NameDescription
Private methodStatic memberFont 
Public methodFont Default constructor
Top
Properties
 NameDescription
Public propertyBold Gets or sets whether the font is bold. If true, the font is declared as bold
Public propertyCharset Gets or sets the char set of the Font (Default is empty)
Public propertyColorTheme Gets or sets the font color theme (Default is 1 = Light 1)
Public propertyColorValue Gets or sets the color code of the font color. The value is expressed as hex string with the format AARRGGBB. AA (Alpha) is usually FF. To omit the color, an empty string can be set. Empty is also default.
Public propertyFamily Gets or sets the font family (Default is 2 = Swiss)
Public propertyInternalID Gets or sets the internal ID for sorting purpose in the Excel style document (nullable)
(Inherited from AbstractStyle)
Public propertyIsDefaultFont Gets whether the font is equal to the default font
Public propertyItalic Gets or sets whether the font is italic. If true, the font is declared as italic
Public propertyName Gets or sets the font name (Default is Calibri)
Public propertyScheme Gets or sets the font scheme (Default is minor)
Public propertySize Gets or sets the font size. Valid range is from 1 to 409
Public propertyStrike Gets or sets whether the font is struck through. If true, the font is declared as strike-through
Public propertyUnderline Gets or sets the underline style of the font. If set to none no underline will be applied (default)
Public propertyVerticalAlign Gets or sets the alignment of the font (Default is none)
Top
Methods
 NameDescription
Public methodCompareTo Method to compare two objects for sorting purpose
(Inherited from AbstractStyle)
Public methodCopy Method to copy the current object to a new one without casting
(Overrides AbstractStyle.Copy())
Public methodCopyFont Method to copy the current object to a new one with casting
Protected methodCopyProperties<T> Internal method to copy altered properties from a source object. The decision whether a property is copied is dependent on a untouched reference object
(Inherited from AbstractStyle)
Public methodEquals(AbstractStyle) Method to compare two objects for sorting purpose
(Inherited from AbstractStyle)
Public methodEquals(Object) Returns whether two instances are the same
(Overrides Object.Equals(Object))
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetHashCode Returns a hash code for this instance.
(Overrides Object.GetHashCode())
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodToString Override toString method
(Overrides Object.ToString())
Private methodValidateFontScheme Validates the font name and sets the scheme automatically
Top
Fields
 NameDescription
Public fieldStatic memberDEFAULT_FONT_FAMILY Default font family
Public fieldStatic memberDEFAULT_FONT_NAME Default font family as constant
Public fieldStatic memberDEFAULT_FONT_SCHEME Default font scheme
Public fieldStatic memberDEFAULT_FONT_SIZE Default font size
Public fieldStatic memberDEFAULT_MAJOR_FONT The default font name that is declared as Major Font (See Font.SchemeValue)
Public fieldStatic memberDEFAULT_MINOR_FONT The default font name that is declared as Minor Font (See Font.SchemeValue)
Public fieldStatic memberDEFAULT_VERTICAL_ALIGN Default vertical alignment
Public fieldStatic memberMAX_FONT_SIZE Minimum possible font size
Public fieldStatic memberMIN_FONT_SIZE Maximum possible font size
Top
See Also