This documentation is archived and is not being maintained.

Fonts Class

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

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

[ChildElementInfoAttribute(typeof(Font))]
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">
<font>
<sz val="11"/>
<color theme="1"/>
<name val="Calibri"/>
<family val="2"/>
<scheme val="minor"/>
</font>
  <font>
<strike/>
<sz val="12"/>
<color theme="1"/>
<name val="Arial"/>
<family val="2"/>
</font>
</fonts>

end example]

Parent Elements

styleSheet (§18.8.39)

Child Elements

Subclause

font (Font)

§18.8.22

Attributes

Description

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.

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