w:sym (Symbol)
Inserts a symbol character from a named font at the specified character code.
Parent elements
Description
w:sym inserts a special symbol character from a specified font at the current run position. It is defined in ECMA-376 Part 1 §17.3.3.30.
Unlike w:t, which carries Unicode text, w:sym references a glyph by its character code within a named font. This is used for symbols in fonts like Symbol or Wingdings whose code points do not map to standard Unicode positions, or where font-specific glyph rendering is required.
Attributes
| Attribute | Type | Possible Values | Description |
|---|---|---|---|
w:font |
ST_String |
Font family name, e.g. Symbol, Wingdings, Wingdings 2 |
The font from which the symbol glyph is drawn. |
w:char |
ST_ShortHexNumber |
4-digit hex character code, e.g. F0E0 |
The glyph code point within the specified font. |
Examples
<!-- Bullet symbol from Wingdings -->
<w:r>
<w:sym w:font="Wingdings" w:char="F0B7"/>
</w:r>
new Run(
new SymbolChar { Font = "Wingdings", Char = "F0B7" });
Notes
- Prefer standard Unicode characters in
w:toverw:symwherever the glyph is available in a standard font, for better interoperability. - The character code is font-relative, not a Unicode code point.