[Table of Contents] [docx version]

WordprocessingML Reference Material - Table of Contents

sym (Symbol Character)

This element specifies the presence of a symbol character at the current location in the run’s content. A symbol character is a special character within a run’s content which does not use any of the run fonts specified in the rFonts element (§2.3.2.24) (or by the style hierarchy).

Instead, this character shall be determined by pulling the character with the hexadecimal value specified in the char attribute from the font specified in the font attribute.

[Example: Consider a run containing the following run content:

This is a symbol character::

The last character in that run is a symbol character from the Wingdings font, and the run is specified as follows:

<w:r>
<w:rPr>
<w:rFonts w:ascii="Courier New" w:hAnsi="Courier New" />
</w:rPr>
<w:t>This is a symbol character:</w:t>
<w:sym w:font="Wingdings" w:code="F03A" />
</w:r>

The resulting symbol is the specified using the sym element, and consists of character code 003A formatted as Wingdings, even though the run properties specify the Courier New font. end example]

Parent Elements

r7.1.2.87); r2.3.2.23)

 

Attributes

Description

char (Symbol Character Code)

Specifies the hexadecimal code for the Unicode character value of the symbol.

 

When this value is stored in the char attribute, it may be stored in either of the following two formats:

1. Directly in its Unicode character value from the font glyph

2. In a Unicode character value created by adding F000 to the actual character value, shifting the character value of this character into the Unicode private use area.

 

[Note: The use of the latter syntax allows for interoperability with legacy word processing formats, as they used this technique to store the fact that a particular character or set of characters came from a font which was not Unicode compliant, and therefore any font matching performed on this range (if the specified font was not present) would be undesirable, as the resulting glyphs and their appearance could not be predicted. end note]

 

[Example: Consider a run with a single symbol character defined as follows:

 

<w:r>
<w:rPr>
<w:rFonts w:ascii="Arial Black" w:hAnsi="Arial Black" />
</w:rPr>
<w:sym w:font="Wingdings" w:char="F045" />
</w:r>

 

The symbol character shall use the font defined in its font attribute and hence use the Wingdings font. The character value for the character to be used from this font is obtained by removing the F000 value from the value in the char attribute, and therefore is the character at hexadecimal position 0045 in that font. end example]

 

The possible values for this attribute are defined by the ST_ShortHexNumber simple type2.18.86).

font (Symbol Character Font)

Specifies a font which shall be used to format this symbol character.

 

[Example: Consider a run with a single symbol character defined as follows:

 

<w:r>
<w:rPr>
<w:rFonts w:ascii="Arial Black" w:hAnsi="Arial Black" />
</w:rPr>
<w:sym w:font="Wingdings" w:char="F045" />
</w:r>

 

Although the run specifies that its contents shall use the Arial Black font, the symbol character shall use the font defined in its font attribute and hence use the Wingdings font. end example]

 

The possible values for this attribute are defined by the ST_String simple type2.18.89).

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_Sym">

   <attribute name="font" type="ST_String"/>

   <attribute name="char" type="ST_ShortHexNumber"/>

</complexType>