+docstring const FontInfo::stateText(bool const terse) const
+{
+ odocstringstream os;
+ if (family() != INHERIT_FAMILY && (!terse || family() != IGNORE_FAMILY))
+ os << _(GUIFamilyNames[family()]) << ", ";
+ if (series() != INHERIT_SERIES && (!terse || series() != IGNORE_SERIES))
+ os << _(GUISeriesNames[series()]) << ", ";
+ if (shape() != INHERIT_SHAPE && (!terse || shape() != IGNORE_SHAPE))
+ os << _(GUIShapeNames[shape()]) << ", ";
+ if (size() != INHERIT_SIZE && (!terse || size() != IGNORE_SIZE))
+ os << _(GUISizeNames[size()]) << ", ";
+ // FIXME: shall style be handled there? Probably not.
+ if (color() != Color_inherit && (!terse || color() != Color_ignore))
+ os << lcolor.getGUIName(color()) << ", ";
+ // FIXME: uncomment this when we support background.
+ //if (background() != Color_inherit)
+ // os << lcolor.getGUIName(background()) << ", ";
+ if (emph() != FONT_INHERIT && (!terse || emph() != FONT_IGNORE))
+ os << bformat(_("Emphasis %1$s, "),
+ _(GUIMiscNames[emph()]));
+ if (underbar() != FONT_INHERIT && (!terse || underbar() == FONT_ON))
+ os << bformat(_("Underline %1$s, "),
+ _(GUIMiscNames[underbar()]));
+ if (uuline() != FONT_INHERIT && (!terse || uuline() == FONT_ON))
+ os << bformat(_("Double underline %1$s, "),
+ _(GUIMiscNames[uuline()]));
+ if (uwave() != FONT_INHERIT && (!terse || uwave() == FONT_ON))
+ os << bformat(_("Wavy underline %1$s, "),
+ _(GUIMiscNames[uwave()]));
+ if (strikeout() != FONT_INHERIT && (!terse || strikeout() == FONT_ON))
+ os << bformat(_("Strike out %1$s, "),
+ _(GUIMiscNames[strikeout()]));
+ if (xout() != FONT_INHERIT && (!terse || xout() == FONT_ON))
+ os << bformat(_("Cross out %1$s, "),
+ _(GUIMiscNames[xout()]));
+ if (noun() != FONT_INHERIT && (!terse || noun() != FONT_IGNORE))
+ os << bformat(_("Noun %1$s, "),
+ _(GUIMiscNames[noun()]));
+ if (*this == inherit_font)
+ os << _("Default") << ", ";
+
+ return os.str();
+}
+
+