Fonts Class

Fonts.When the object is serialized out as xml, its qualified name is x:fonts.

Inheritance Hierarchy


Namespace:  DocumentFormat.OpenXml.Spreadsheet
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)


<ChildElementInfoAttribute(GetType(Font))> _
Public Class Fonts _
    Inherits OpenXmlCompositeElement
Dim instance As Fonts
public class Fonts : OpenXmlCompositeElement


The following table lists the possible child types:

  • Font <x:font>

[ISO/IEC 29500-1 1st Edition]

18.8.23 fonts (Fonts)

This element contains all font definitions for this workbook.

[Example:This example expresses two fonts in the workbook. A Calibri family font, with font size of 11, and an Arial family font, with font size 12. The second font has strikethrough applied.

<fonts count="2">
<sz val="11"/>
<color theme="1"/>
<name val="Calibri"/>
<family val="2"/>
<scheme val="minor"/>
<sz val="12"/>
<color theme="1"/>
<name val="Arial"/>
<family val="2"/>

end example]

Parent Elements

styleSheet (§18.8.39)

Child Elements


font (Font)




count (Font Count)

Count of font elements.

The possible values for this attribute are defined by the W3C XML Schema unsignedInt datatype.

[Note: The W3C XML Schema definition of this element’s content model (CT_Fonts) is located in §A.2. end note]

© ISO/IEC29500: 2008.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also


Fonts Members

DocumentFormat.OpenXml.Spreadsheet Namespace