Share via


FontReference class

Defines the FontReference Class.This class is only available in O15. When the object is serialized out as xml, its qualified name is cs:fontRef.

Inheritance hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Office15.Drawing.ChartStyle.FontReference

Namespace:  DocumentFormat.OpenXml.Office15.Drawing.ChartStyle
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<OfficeAvailabilityAttribute(FileFormatVersions.Office15)> _
<ChildElementInfoAttribute(GetType(RgbColorModelPercentage))> _
<ChildElementInfoAttribute(GetType(RgbColorModelHex))> _
<ChildElementInfoAttribute(GetType(HslColor))> _
<ChildElementInfoAttribute(GetType(SystemColor))> _
<ChildElementInfoAttribute(GetType(SchemeColor))> _
<ChildElementInfoAttribute(GetType(PresetColor))> _
<ChildElementInfoAttribute(GetType(StyleColor), FileFormatVersions.Office15)> _
Public Class FontReference _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As FontReference
[OfficeAvailabilityAttribute(FileFormatVersions.Office15)]
[ChildElementInfoAttribute(typeof(RgbColorModelPercentage))]
[ChildElementInfoAttribute(typeof(RgbColorModelHex))]
[ChildElementInfoAttribute(typeof(HslColor))]
[ChildElementInfoAttribute(typeof(SystemColor))]
[ChildElementInfoAttribute(typeof(SchemeColor))]
[ChildElementInfoAttribute(typeof(PresetColor))]
[ChildElementInfoAttribute(typeof(StyleColor), FileFormatVersions.Office15)]
public class FontReference : OpenXmlCompositeElement

Remarks

2.5.97 CT_FontReference

Target namespace: https://schemas.microsoft.com/office/drawing/2012/chartStyle

Referenced by: CT_StyleEntry

A reference to the document's font scheme. This element is identical to CT_FontReference ([ISO/IEC-29500-1] section A.4.1) but also allows for a CT_StyleColor (section 2.5.95) element and a modifier list*.*

Child Elements:

scrgbClr: A CT_ScRgbColor ([ISO/IEC-29500-1] section A.4.1) element that specifies a color using the red-green-blue (RGB) color model. See ([ISO/IEC-29500-1] section 20.1.2.3.30).

srgbClr: A CT_SRgbColor ([ISO/IEC-29500-1] section A.4.1) element that specifies a color using the RGB color model. See ([ISO/IEC-29500-1] section 20.1.2.3.32).

hslClr: A CT_HslColor ([ISO/IEC-29500-1] section A.4.1) element that specifies a color using the HSL color model. See ([ISO/IEC-29500-1] section 20.1.2.3.13).

sysClr: A CT_SystemColor ([ISO/IEC-29500-1] section A.4.1) element that specifies a color bound to predefined operating system elements. See ([ISO/IEC-29500-1] section 20.1.2.3.33).

schemeClr: A CT_SchemeColor ([ISO/IEC-29500-1] section A.4.1) element that specifies a color bound to a user's theme. See ([ISO/IEC-29500-1] section 20.1.2.3.29).

prstClr: A CT_PresetColor ([ISO/IEC-29500-1] section A.4.1) element that specifies a color which is bound to one of a predefined collection of colors. See ([ISO/IEC-29500-1] section 20.1.2.3.22).

styleClr: A CT_StyleColor element that specifies a color calculated from a CT_ColorStyle.

Attributes:

idx: An ST_FontCollectionIndex ([ISO/IEC-29500-1] section 20.1.10.25) attribute that specifies a font associated with the style.

mods: An ST_StyleReferenceModifierList attribute that specifies a list of modifiers for this reference.

The following W3C XML Schema ([XMLSCHEMA1] section 2.1) fragment specifies the contents of this complex type.

<xsd:complexType name="CT_FontReference">

<xsd:sequence>

<xsd:group ref="a:EG_ColorChoice" minOccurs="0" maxOccurs="1"/>

<xsd:element name="styleClr" type="CT_StyleColor" minOccurs="0" maxOccurs="1"/>

</xsd:sequence>

<xsd:attribute name="idx" type="a:ST_FontCollectionIndex" use="required"/>

<xsd:attribute name="mods" type="ST_StyleReferenceModifierList" use="optional"/>

</xsd:complexType>

See section 5.16 for the full W3C XML Schema ([XMLSCHEMA1] section 2.1).

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

Reference

FontReference members

DocumentFormat.OpenXml.Office15.Drawing.ChartStyle namespace