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" });
<!-- Multiple symbols with text -->
<w:r>
<w:sym w:font="Wingdings" w:char="F0A7"/> <!-- Diamond -->
</w:r>
<w:r>
<w:t xml:space="preserve"> Important Item</w:t>
</w:r>
<!-- Check mark from Wingdings 2 -->
<w:r>
<w:sym w:font="Wingdings 2" w:char="F052"/> <!-- Check mark -->
</w:r>
new Run(new SymbolChar { Font = "Wingdings", Char = "F0A7" }), // Diamond
new Run(new Text(" Important Item")),
// Check mark
new Run(new SymbolChar { Font = "Wingdings 2", Char = "F052" });
<!-- Symbol with formatting -->
<w:r>
<w:rPr>
<w:color w:val="FF0000"/>
<w:sz w:val="32"/> <!-- 16pt -->
</w:rPr>
<w:sym w:font="Wingdings" w:char="F06E"/> <!-- Heart -->
</w:r>
new Run(
new RunProperties(
new Color { Val = "FF0000" }, // Red
new FontSize { Val = "32" }), // 16pt
new SymbolChar { Font = "Wingdings", Char = "F06E" }); // Heart
Common Symbol Fonts and Glyphs
| Font | Code | Glyph | Use Case |
|---|---|---|---|
| Wingdings | F0B7 | • | Bullet point |
| Wingdings | F0A7 | ◆ | Diamond |
| Wingdings | F06E | ♥ | Heart |
| Wingdings | F0A8 | ○ | Hollow bullet |
| Wingdings 2 | F052 | ✓ | Check mark |
| Wingdings 2 | F0A8 | ☐ | Checkbox (unchecked) |
| Wingdings 2 | F0C5 | ✗ | X mark |
| Symbol | F0A4 | ✓ | Check (alternate) |
| Symbol | F0A8 | ✓ | Check (solid) |
Character Code Reference
| Format | Example | Notes |
|---|---|---|
| Hex (4-digit) | F0B7 |
Use this in w:sym/@w:char |
| Unicode | U+00B7 | Reference; may not match font code |
| Decimal | 61623 | Less common; avoid |
Notes
- Prefer Unicode: Use standard Unicode characters in
w:toverw:symwherever the glyph is available in a standard font, for better interoperability. - Character code mapping: The character code is font-relative, not a Unicode code point; the same code in different fonts produces different glyphs.
- Font availability: The
w:fontmust be installed on the system viewing the document; missing fonts fall back to a substitute font. - Symbol fonts common use: Wingdings and Wingdings 2 are most common for decorative symbols; Symbol font for math/science notations.
- Formatting inheritance: The symbol inherits text properties (color, size, bold) from the run’s
w:rPr. - Accessibility: Symbol glyphs may not be readable by screen readers; provide alt text or description in surrounding text.
- Backward compatibility:
w:symis legacy; newer documents prefer Unicode text with specialized fonts. - Display fallback: If the font doesn’t contain the glyph code, renderers display a replacement character (often a question mark or box).
- Bullet lists: While
w:symcan create bullet-like glyphs, prefer semantic list markup (w:numPr) for proper outline hierarchy. - Rendering variations: Different Operating Systems and applications may render the same font/code combination differently.