Help markup

From The Battle for Wesnoth Wiki
Revision as of 04:30, 29 July 2024 by Bssarkar (talk | contribs) (Information on formatting tags)

Help Markup

This page documents the markup used by the Rich Label widget. This is a markup language based on the Pango markup already being used by other GUI2 widgets to show formatted text and the earlier GUI1 help markup. Specifically, you can add links, tables and images (inline and floating) alongside formatted text.

Both GUI1 style syntax (<img>src='path/to/myimage.png'</img>) and newer XML style syntax (<img src='path/to/myimage.png'/>) are supported. The new syntax is recommended. The internal XML parser doesn't support nested tags at the moment (limitation might be removed in the future). Use single quotes inside markup.

Formatting Tags

  • bold/b: Makes the text bold.
  • italic/i: Makes the text italic.
  • underline/u: Adds an underline to text.
  • header: Shows the text formatted as a heading (serif font at size 20 and color white).
  • span/format: Applies various types of formatting to the marked up text. Similar to the Pango span tag, but only the following attributes are supported:
    • face/font_family
    • size/font_size
    • color/fgcolor/foreground
    • bgcolor/background
    • weight
    • style

For documentation on these attributes of span/format, please see the [docs].

Image Tags

Links

Table Tags