Freigeben über


SymbolChar-Klasse

Symbol Character.When the object is serialized out as xml, its qualified name is w:sym.

Vererbungshierarchie

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Wordprocessing.SymbolChar

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

Syntax

'Declaration
Public Class SymbolChar _
    Inherits OpenXmlLeafElement
'Usage
Dim instance As SymbolChar
public class SymbolChar : OpenXmlLeafElement

Hinweise

[ISO/IEC 29500-1 1. Ausgabe]

17.3.3.30 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 (§17.3.2.26) (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:char="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

r (§22.1.2.87); r (§17.3.2.25)

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 can be stored in either of the following two formats:

Directly in its Unicode character value from the font glyph

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 must 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 type (§17.18.79).

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 must use the Arial Black font, the symbol character must 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 type (§22.9.2.13).

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

© ISO/IEC29500: 2008. Die oben aufgeführten Textauszüge wurden von Microsoft (und/oder den Microsoft-Vendoren) von Englisch nach Deutsch übersetzt, und im Rahmen von ISO wird keinerlei Verantwortung für diese Übersetzungen übernommen.

Threadsicherheit

Alle öffentlichen static (Shared in Visual Basic) Member dieses Typs sind threadsicher. Bei Instanzmembern ist die Threadsicherheit nicht gewährleistet.

Siehe auch

Referenz

SymbolChar-Member

DocumentFormat.OpenXml.Wordprocessing-Namespace