This documentation is archived and is not being maintained.

Font Class

Font Properties.When the object is serialized out as xml, its qualified name is x:font.

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

[ChildElementInfoAttribute(typeof(VerticalTextAlignment))]
[ChildElementInfoAttribute(typeof(Bold))]
[ChildElementInfoAttribute(typeof(Italic))]
[ChildElementInfoAttribute(typeof(Strike))]
[ChildElementInfoAttribute(typeof(Condense))]
[ChildElementInfoAttribute(typeof(Extend))]
[ChildElementInfoAttribute(typeof(Outline))]
[ChildElementInfoAttribute(typeof(Shadow))]
[ChildElementInfoAttribute(typeof(Underline))]
[ChildElementInfoAttribute(typeof(FontCharSet))]
[ChildElementInfoAttribute(typeof(Color))]
[ChildElementInfoAttribute(typeof(FontName))]
[ChildElementInfoAttribute(typeof(FontFamilyNumbering))]
[ChildElementInfoAttribute(typeof(FontSize))]
[ChildElementInfoAttribute(typeof(FontScheme))]
public class Font : OpenXmlCompositeElement

The following table lists the possible child types:

  • Bold <x:b>

  • Italic <x:i>

  • Strike <x:strike>

  • Condense <x:condense>

  • Extend <x:extend>

  • Outline <x:outline>

  • Shadow <x:shadow>

  • Underline <x:u>

  • VerticalTextAlignment <x:vertAlign>

  • FontSize <x:sz>

  • Color <x:color>

  • FontName <x:name>

  • FontFamilyNumbering <x:family>

  • FontCharSet <x:charset>

  • FontScheme <x:scheme>


[ISO/IEC 29500-1 1st Edition]

18.8.22 font (Font)

This element defines the properties for one of the fonts used in this workbook.

Parent Elements

dxf (§18.8.14); fonts (§18.8.23); ndxf (§18.11.1.4); odxf (§18.11.1.6)

Child Elements

Subclause

b (Bold)

§18.8.2

charset (Character Set)

§18.4.1

color (Data Bar Color)

§18.3.1.15

condense (Condense)

§18.8.12

extend (Extend)

§18.8.17

family (Font Family)

§18.8.18

i (Italic)

§18.8.26

name (Font Name)

§18.8.29

outline (Outline)

§18.4.2

scheme (Scheme)

§18.8.35

shadow (Shadow)

§18.8.36

strike (Strike Through)

§18.4.10

sz (Font Size)

§18.4.11

u (Underline)

§18.4.13

vertAlign (Vertical Alignment)

§18.4.14

[Note: The W3C XML Schema definition of this element’s content model (CT_Font) 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: