It's been over a year since I mentioned text in XML gauges (an area where we don't do a good job of documentation) and a while since I posted anything truly useful on this blog, so I guess it's about time...
A coworker and I were looking at some XML script and got onto the topic of our string syntax, which is something that wasn't fully documented in the FSX SDK, unfortunately. It looks like we omitted any explanation of the escape sequences that can be used in these strings (which have been around since FS 2002). So, after a 4-year delay, here's a list of examples. Hopefully an SDK or blog post will go more in-depth in the future.
Escape code example
set 3 tab stops; the first is right-aligned, the second is centered, and last is left-aligned.
switch to the first alternate font specified as a child of the gauge text element
return to the default font
normal (neither superscript nor subscript)
reverse background/foreground color for text
normal - clear all properties previously set.
background line color
put a degrees symbol above the next character after the ‘=’
make X superscript and Y subscript
set line spacing to 23
set line spacing to default
set horizontal text alignment to left. (use ‘C’ for center or ‘R’ for right)
draw a horizontal line with width 240
set the left margin to 20
set the right margin to 30
insert image #1 (a text element can have image children)
I hope this helps. Let me know if you think it would be useful to give a more thorough explanation.