The Battle for Wesnoth  1.17.21+dev
Namespaces | Functions
text_formatting.cpp File Reference
#include "font/text_formatting.hpp"
#include "formatter.hpp"
#include "game_config.hpp"
#include "gettext.hpp"
#include "color.hpp"
#include <iomanip>
Include dependency graph for text_formatting.cpp:

Go to the source code of this file.


 Collection of helper functions relating to Pango formatting.


std::string font::span_color (const color_t &color)
 Returns a Pango formatting string using the provided color_t object. More...
std::string font::span_color (const color_t &color, const std::string &data)
 Like span_color(const color_t&), but append the data string and a "</span>" tag. More...
std::string font::get_pango_color_from_id (const std::string &id)
 Returns a hex color string from a color range. More...
std::string font::get_color_string_pango (const std::string &id)
 Returns the name of a color range, colored with its own color. More...