The Battle for Wesnoth  1.17.0-dev
Classes | Enumerations | Functions | Variables
font Namespace Reference

Collection of helper functions relating to Pango formatting. More...

Classes

struct  error
 
class  floating_label
 
struct  floating_label_context
 structure which will hide all current floating labels, and cause floating labels instantiated after it is created to be displayed More...
 
struct  inverse_table
 
struct  manager
 
class  p_font
 Small helper class to make sure the pango font object is destroyed properly. More...
 
class  pango_text
 Text class. More...
 
struct  subset_descriptor
 

Enumerations

enum  ALIGN { LEFT_ALIGN, CENTER_ALIGN, RIGHT_ALIGN }
 
enum  LABEL_SCROLL_MODE { ANCHOR_LABEL_SCREEN, ANCHOR_LABEL_MAP }
 
enum  family_class { FONT_SANS_SERIF, FONT_MONOSPACE, FONT_LIGHT, FONT_SCRIPT }
 Font classes for get_font_families(). More...
 

Functions

int add_floating_label (const floating_label &flabel)
 add a label floating on the screen above everything else. More...
 
void move_floating_label (int handle, double xmove, double ymove)
 moves the floating label given by 'handle' by (xmove,ymove) More...
 
void scroll_floating_labels (double xmove, double ymove)
 moves all floating labels that have 'scroll_mode' set to ANCHOR_LABEL_MAP More...
 
void remove_floating_label (int handle, int fadeout=0)
 removes the floating label given by 'handle' from the screen More...
 
void show_floating_label (int handle, bool show)
 hides or shows a floating label More...
 
SDL_Rect get_floating_label_rect (int handle)
 
void draw_floating_labels (surface screen)
 
void undraw_floating_labels (surface screen)
 
int relative_size (int size)
 
bool check_font_file (std::string name)
 Test if a font file exists. More...
 
bool load_font_config ()
 
const t_stringget_font_families (family_class fclass=FONT_SANS_SERIF)
 Returns the currently defined fonts. More...
 
family_class str_to_family_class (const std::string &str)
 
std::string escape_text (const std::string &text)
 Escapes the pango markup characters in a text. More...
 
std::string semi_escape_text (const std::string &text)
 
bool looks_like_url (std::string_view str)
 
std::string format_as_link (const std::string &link, color_t color)
 
surface pango_render_text (const std::string &text, int size, const color_t &color, font::pango_text::FONT_STYLE style=font::pango_text::STYLE_NORMAL, bool use_markup=false, int max_width=-1)
 Returns a SDL surface containing the rendered text. More...
 
std::pair< int, int > pango_line_size (const std::string &line, int font_size, font::pango_text::FONT_STYLE font_style=font::pango_text::STYLE_NORMAL)
 Determine the width and height of a line of text given a certain font size. More...
 
std::string pango_line_ellipsize (const std::string &text, int font_size, int max_width, font::pango_text::FONT_STYLE font_style=font::pango_text::STYLE_NORMAL)
 If the text exceeds the specified max width, end it with an ellipsis (...) More...
 
std::string pango_word_wrap (const std::string &unwrapped_text, int font_size, int max_width, int max_height=-1, int max_lines=-1, bool partial_line=false)
 Uses Pango to word wrap text. More...
 
SDL_Rect pango_draw_text (CVideo *gui, const SDL_Rect &area, int size, const color_t &color, const std::string &text, int x, int y, bool use_tooltips=false, pango_text::FONT_STYLE style=pango_text::STYLE_NORMAL)
 Draws text on the screen. More...
 
SDL_Rect pango_draw_text (surface &dst, const SDL_Rect &area, int size, const color_t &color, const std::string &text, int x, int y, bool use_tooltips=false, pango_text::FONT_STYLE style=pango_text::STYLE_NORMAL)
 Draws text on a surface. More...
 
int pango_line_width (const std::string &line, int font_size, font::pango_text::FONT_STYLE font_style=font::pango_text::STYLE_NORMAL)
 Determine the width of a line of text given a certain font size. More...
 
static void unpremultiply (uint8_t &value, const unsigned div)
 
static void from_cairo_format (uint32_t &c)
 Converts from cairo-format ARGB32 premultiplied alpha to plain alpha. More...
 
pango_textget_text_renderer ()
 Returns a reference to a static pango_text object. More...
 
int get_max_height (unsigned size, font::family_class fclass=font::FONT_SANS_SERIF, pango_text::FONT_STYLE style=pango_text::STYLE_NORMAL)
 Returns the maximum glyph height of a font, in pixels. More...
 
std::string span_color (const color_t &color)
 Returns a Pango formatting string using the provided color_t object. More...
 
std::string 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 get_pango_color_from_id (const std::string &id)
 Returns a hex color string from a color range. More...
 
std::string get_color_string_pango (const std::string &id)
 Returns the name of a color range, colored with its own color. More...
 

Variables

const int SIZE_NORMAL = 17
 
const int SIZE_TINY = 13 * (SIZE_NORMAL / 17)
 
const int SIZE_SMALL = 15 * (SIZE_NORMAL / 17)
 
const int SIZE_BUTTON = 16 * (SIZE_NORMAL / 17)
 
const int SIZE_BUTTON_SMALL = 14 * (SIZE_NORMAL / 17)
 
const int SIZE_15 = 15 * (SIZE_NORMAL / 17)
 
const int SIZE_PLUS = 18 * (SIZE_NORMAL / 17)
 
const int SIZE_LARGE = 20 * (SIZE_NORMAL / 17)
 
const int SIZE_TITLE = 22 * (SIZE_NORMAL / 17)
 
const int SIZE_FLOAT_LABEL = 24 * (SIZE_NORMAL / 17)
 
const int SIZE_XLARGE = 36 * (SIZE_NORMAL / 17)
 
const std::size_t max_text_line_width = 4096
 
const std::string ellipsis = "..."
 
const std::string nbsp = " "
 
const std::string unicode_minus = "-"
 
const std::string unicode_en_dash = "–"
 
const std::string unicode_em_dash = "—"
 
const std::string unicode_figure_dash = "‒"
 
const std::string unicode_multiplication_sign = "×"
 
const std::string unicode_bullet = "•"
 
const std::string weapon_numbers_sep = "×"
 
const std::string weapon_details_sep = "–"
 
const color_t NORMAL_COLOR {221, 221, 221}
 
const color_t GRAY_COLOR {136, 136, 136}
 
const color_t LOBBY_COLOR {187, 187, 187}
 
const color_t GOOD_COLOR {0 , 181, 26 }
 
const color_t BAD_COLOR {255, 0 , 0 }
 
const color_t BLACK_COLOR {0 , 0 , 0 }
 
const color_t YELLOW_COLOR {255, 255, 0 }
 
const color_t BUTTON_COLOR {186, 172, 125}
 
const color_t PETRIFIED_COLOR {160, 160, 160}
 
const color_t TITLE_COLOR {186, 172, 125}
 
const color_t LABEL_COLOR {107, 140, 255}
 
const color_t BIGMAP_COLOR {255, 255, 255}
 
const color_t DISABLED_COLOR = PETRIFIED_COLOR.inverse()
 
const color_t weapon_color {245, 230, 193}
 
const color_t good_dmg_color {130, 240, 50 }
 
const color_t bad_dmg_color {250, 140, 80 }
 
const color_t weapon_details_color {196, 176, 147}
 
const color_t inactive_details_color { 86, 86, 86}
 
const color_t inactive_ability_color {146, 146, 146}
 
const color_t unit_type_color {245, 230, 193}
 
const color_t race_color {166, 146, 117}
 
static const inverse_table inverse_table_
 

Detailed Description

Collection of helper functions relating to Pango formatting.

Graphical text output.

This module is used to display and measure text. Text can optionally contain special characters, which may change specified display properties such as colour or font size. If special characters are turned on, they can be escaped, C-style, using backslashes.

Enumeration Type Documentation

◆ ALIGN

Enumerator
LEFT_ALIGN 
CENTER_ALIGN 
RIGHT_ALIGN 

Definition at line 34 of file floating_label.hpp.

◆ family_class

Font classes for get_font_families().

Enumerator
FONT_SANS_SERIF 
FONT_MONOSPACE 
FONT_LIGHT 
FONT_SCRIPT 

Definition at line 26 of file font_options.hpp.

◆ LABEL_SCROLL_MODE

Enumerator
ANCHOR_LABEL_SCREEN 
ANCHOR_LABEL_MAP 

Definition at line 36 of file floating_label.hpp.

Function Documentation

◆ add_floating_label()

int font::add_floating_label ( const floating_label flabel)

◆ check_font_file()

bool font::check_font_file ( std::string  name)

Test if a font file exists.

Definition at line 63 of file font_config.cpp.

References filesystem::ends_with(), filesystem::file_exists(), game_config::path, and WRN_FT.

◆ draw_floating_labels()

void font::draw_floating_labels ( surface  screen)

Definition at line 325 of file floating_label.cpp.

References i.

Referenced by gui2::window::draw(), and display::flip().

◆ escape_text()

std::string font::escape_text ( const std::string &  text)
inline

◆ format_as_link()

std::string font::format_as_link ( const std::string &  link,
color_t  color 
)
inline

Definition at line 32 of file hyperlink.hpp.

References color_t::to_hex_string().

Referenced by font::pango_text::format_links().

◆ from_cairo_format()

static void font::from_cairo_format ( uint32_t &  c)
static

Converts from cairo-format ARGB32 premultiplied alpha to plain alpha.

Parameters
ca uint32 representing the color

Definition at line 625 of file text.cpp.

References a, b, g, and unpremultiply().

Referenced by font::pango_text::rerender().

◆ get_color_string_pango()

std::string font::get_color_string_pango ( const std::string &  id)

Returns the name of a color range, colored with its own color.

Parameters
idThe id of the color range.

Definition at line 45 of file text_formatting.cpp.

References _(), get_pango_color_from_id(), and game_config::team_rgb_name.

Referenced by gui2::dialogs::mp_staging::add_side_node().

◆ get_floating_label_rect()

SDL_Rect font::get_floating_label_rect ( int  handle)

◆ get_font_families()

const t_string & font::get_font_families ( family_class  fclass = FONT_SANS_SERIF)

Returns the currently defined fonts.

Definition at line 160 of file font_config.cpp.

References FONT_LIGHT, FONT_MONOSPACE, and FONT_SCRIPT.

Referenced by font::pango_text::calculate_size(), and font::pango_text::get_max_glyph_height().

◆ get_max_height()

int font::get_max_height ( unsigned  size,
font::family_class  fclass = font::FONT_SANS_SERIF,
pango_text::FONT_STYLE  style = pango_text::STYLE_NORMAL 
)

Returns the maximum glyph height of a font, in pixels.

Parameters
sizeDesired font size in pixels.
fclassFont family to use for measurement.
styleFont style to select the correct variant for measurement.
Returns
The height of the tallest possible glyph for the selected font. More specifically, the result is the sum of the maximum ascent and descent lengths.

Definition at line 897 of file text.cpp.

References font::pango_text::get_max_glyph_height(), get_text_renderer(), font::pango_text::set_family_class(), font::pango_text::set_font_size(), and font::pango_text::set_font_style().

Referenced by gui::textbox::add_text_line(), gui::textbox::textbox(), gui::dialog_frame::top_padding(), and gui2::text_box::update_offsets().

◆ get_pango_color_from_id()

std::string font::get_pango_color_from_id ( const std::string &  id)

Returns a hex color string from a color range.

Parameters
idThe id of the color range.

Definition at line 35 of file text_formatting.cpp.

References game_config::team_rgb_colors.

Referenced by gui2::dialogs::mp_join_game::generate_side_list(), and get_color_string_pango().

◆ get_text_renderer()

pango_text & font::get_text_renderer ( )

Returns a reference to a static pango_text object.

Since the class is essentially a render pipeline, there's no need for individual areas of the game to own their own renderers. Not to mention it isn't a trivial class; constructing one is likely to be expensive.

Definition at line 891 of file text.cpp.

Referenced by font::floating_label::create_surface(), gui2::text_shape::draw(), get_max_height(), and display::refresh_report().

◆ load_font_config()

bool font::load_font_config ( )

◆ looks_like_url()

bool font::looks_like_url ( std::string_view  str)
inline

Definition at line 27 of file hyperlink.hpp.

Referenced by font::pango_text::format_links(), and font::pango_text::get_link().

◆ move_floating_label()

void font::move_floating_label ( int  handle,
double  xmove,
double  ymove 
)

moves the floating label given by 'handle' by (xmove,ymove)

Definition at line 252 of file floating_label.cpp.

References i.

Referenced by display_chat_manager::prune_chat_messages(), CVideo::set_help_string(), and show_tooltip().

◆ pango_draw_text() [1/2]

SDL_Rect font::pango_draw_text ( CVideo gui,
const SDL_Rect &  area,
int  size,
const color_t color,
const std::string &  text,
int  x,
int  y,
bool  use_tooltips = false,
pango_text::FONT_STYLE  style = pango_text::STYLE_NORMAL 
)

Draws text on the screen.

gui can be nullptr, in which case the bounding rectangle will still be returned.

Definition at line 140 of file sdl_ttf_compat.cpp.

References CVideo::getSurface(), and utf8::size().

Referenced by gui::button::calculate_size(), location_palette_item::draw_contents(), gui::button::draw_contents(), draw_label(), gui::menu::draw_row(), gui::dialog_frame::draw_title(), gui::menu::style::item_size(), and pango_line_width().

◆ pango_draw_text() [2/2]

SDL_Rect font::pango_draw_text ( surface dst,
const SDL_Rect &  area,
int  size,
const color_t color,
const std::string &  text,
int  x,
int  y,
bool  use_tooltips = false,
pango_text::FONT_STYLE  style = pango_text::STYLE_NORMAL 
)

Draws text on a surface.

The text will be clipped to area. If the text runs outside of area horizontally, an ellipsis will be displayed at the end of it.

If use_tooltips is true, then text with an ellipsis will have a tooltip set for it equivalent to the entire contents of the text.

A bounding rectangle of the text is returned. If dst is nullptr, then the text will not be drawn, and a bounding rectangle only will be returned.

Definition at line 147 of file sdl_ttf_compat.cpp.

References tooltips::add_tooltip(), FONT_SANS_SERIF, s, and sdl_blit().

◆ pango_line_ellipsize()

std::string font::pango_line_ellipsize ( const std::string &  text,
int  font_size,
int  max_width,
font::pango_text::FONT_STYLE  font_style 
)

◆ pango_line_size()

std::pair< int, int > font::pango_line_size ( const std::string &  line,
int  font_size,
font::pango_text::FONT_STYLE  font_style 
)

Determine the width and height of a line of text given a certain font size.

Definition at line 61 of file sdl_ttf_compat.cpp.

References FONT_SANS_SERIF, and s.

Referenced by gui::menu::draw_row(), and pango_line_width().

◆ pango_line_width()

int font::pango_line_width ( const std::string &  line,
int  font_size,
font::pango_text::FONT_STYLE  font_style = font::pango_text::STYLE_NORMAL 
)
inline

◆ pango_render_text()

surface font::pango_render_text ( const std::string &  text,
int  size,
const color_t color,
font::pango_text::FONT_STYLE  style,
bool  use_markup,
int  max_width 
)

Returns a SDL surface containing the rendered text.

Definition at line 45 of file sdl_ttf_compat.cpp.

References FONT_SANS_SERIF.

Referenced by help::help_text_area::add_text_item(), gui::textbox::add_text_line(), display::draw_hex(), display::draw_text_in_hex(), and help::help_text_area::set_items().

◆ pango_word_wrap()

std::string font::pango_word_wrap ( const std::string &  unwrapped_text,
int  font_size,
int  max_width,
int  max_height,
int  max_lines,
bool   
)

Uses Pango to word wrap text.

Definition at line 108 of file sdl_ttf_compat.cpp.

References FONT_SANS_SERIF, and font::pango_text::STYLE_NORMAL.

Referenced by display_chat_manager::add_chat_message(), pango_line_width(), and help::split_in_width().

◆ relative_size()

int font::relative_size ( int  size)
inline

◆ remove_floating_label()

void font::remove_floating_label ( int  handle,
int  fadeout = 0 
)

◆ scroll_floating_labels()

void font::scroll_floating_labels ( double  xmove,
double  ymove 
)

moves all floating labels that have 'scroll_mode' set to ANCHOR_LABEL_MAP

Definition at line 260 of file floating_label.cpp.

References ANCHOR_LABEL_MAP, and i.

Referenced by display::scroll().

◆ semi_escape_text()

std::string font::semi_escape_text ( const std::string &  text)
inline

Definition at line 52 of file escape.hpp.

References c.

Referenced by font::pango_text::validate_markup().

◆ show_floating_label()

void font::show_floating_label ( int  handle,
bool  value 
)

hides or shows a floating label

Definition at line 285 of file floating_label.cpp.

References i.

Referenced by terrain_label::calculate_shroud().

◆ span_color() [1/2]

std::string font::span_color ( const color_t color)

Returns a Pango formatting string using the provided color_t object.

The string returned will be in format: <span foreground=#color> Callers will need to manually append the closing </span>' tag.

Parameters
colorThe color_t object from which to retrieve the color.

Definition at line 25 of file text_formatting.cpp.

References color_t::to_hex_string().

Referenced by gui2::dialogs::add_unit_entry(), gui2::dialogs::mp_lobby::adjust_game_row_contents(), attack_info(), gui2::dialogs::campaign_selection::campaign_selected(), gui2::addon_list::colorize_addon_state_string(), editor::editor_palette< overlay >::draw_contents(), gui2::dialogs::format_level_string(), gui2::dialogs::gray_if_unrecruitable(), gray_inactive(), image_report(), gui2::dialogs::mp_lobby::make_game_row_data(), gui2::dialogs::maybe_inactive(), gui2::dialogs::label_settings::pre_show(), gui2::dialogs::mp_change_control::pre_show(), gui2::dialogs::unit_list::pre_show(), gui2::dialogs::unit_attack::pre_show(), gui2::dialogs::unit_recall::pre_show(), gui2::dialogs::campaign_difficulty::pre_show(), gui2::unit_preview_pane::print_attack_details(), REPORT_GENERATOR(), gui2::addon_list::set_addons(), gui2::dialogs::attack_predictions::set_data(), gui2::unit_preview_pane::set_displayed_type(), gui2::unit_preview_pane::set_displayed_unit(), span_color(), gui2::dialogs::tally(), unit_abilities(), unit_alignment(), unit_defense(), unit_hp(), unit_moves(), unit_weapons(), unit_xp(), gui2::lobby_player_list_helper::update(), and attack_type::weapon_specials().

◆ span_color() [2/2]

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.

Definition at line 30 of file text_formatting.cpp.

References span_color().

◆ str_to_family_class()

family_class font::str_to_family_class ( const std::string &  str)
inline

Definition at line 34 of file font_options.hpp.

References FONT_LIGHT, FONT_MONOSPACE, FONT_SANS_SERIF, and FONT_SCRIPT.

◆ undraw_floating_labels()

void font::undraw_floating_labels ( surface  screen)

Definition at line 343 of file floating_label.cpp.

References i.

Referenced by display::flip(), and gui2::window::show().

◆ unpremultiply()

static void font::unpremultiply ( uint8_t &  value,
const unsigned  div 
)
static

Definition at line 609 of file text.cpp.

Referenced by from_cairo_format().

Variable Documentation

◆ BAD_COLOR

const color_t font::BAD_COLOR {255, 0 , 0 }

◆ bad_dmg_color

const color_t font::bad_dmg_color {250, 140, 80 }

◆ BIGMAP_COLOR

const color_t font::BIGMAP_COLOR {255, 255, 255}

Definition at line 32 of file standard_colors.cpp.

Referenced by help::string_to_color().

◆ BLACK_COLOR

const color_t font::BLACK_COLOR {0 , 0 , 0 }

Definition at line 26 of file standard_colors.cpp.

Referenced by display::draw_text_in_hex(), and help::string_to_color().

◆ BUTTON_COLOR

const color_t font::BUTTON_COLOR {186, 172, 125}

Definition at line 28 of file standard_colors.cpp.

Referenced by gui::button::calculate_size(), and gui::button::draw_contents().

◆ DISABLED_COLOR

const color_t font::DISABLED_COLOR = PETRIFIED_COLOR.inverse()

Definition at line 34 of file standard_colors.cpp.

◆ ellipsis

const std::string font::ellipsis = "..."

Definition at line 39 of file constants.cpp.

Referenced by utils::ellipsis_truncate(), pango_line_ellipsize(), and relative_size().

◆ GOOD_COLOR

const color_t font::GOOD_COLOR {0 , 181, 26 }

◆ good_dmg_color

const color_t font::good_dmg_color {130, 240, 50 }

◆ GRAY_COLOR

const color_t font::GRAY_COLOR {136, 136, 136}

◆ inactive_ability_color

const color_t font::inactive_ability_color {146, 146, 146}

Definition at line 42 of file standard_colors.cpp.

Referenced by unit_abilities().

◆ inactive_details_color

const color_t font::inactive_details_color { 86, 86, 86}

Definition at line 41 of file standard_colors.cpp.

Referenced by attack_info(), and attack_type::weapon_specials().

◆ inverse_table_

const inverse_table font::inverse_table_
static

Definition at line 603 of file text.cpp.

◆ LABEL_COLOR

const color_t font::LABEL_COLOR {107, 140, 255}

◆ LOBBY_COLOR

const color_t font::LOBBY_COLOR {187, 187, 187}

Definition at line 23 of file standard_colors.cpp.

◆ max_text_line_width

const std::size_t font::max_text_line_width = 4096

Definition at line 36 of file constants.cpp.

Referenced by relative_size().

◆ nbsp

const std::string font::nbsp = " "

Definition at line 40 of file constants.cpp.

Referenced by help::unit_topic_generator::operator()(), and relative_size().

◆ NORMAL_COLOR

const color_t font::NORMAL_COLOR {221, 221, 221}

◆ PETRIFIED_COLOR

const color_t font::PETRIFIED_COLOR {160, 160, 160}

Definition at line 29 of file standard_colors.cpp.

◆ race_color

const color_t font::race_color {166, 146, 117}

Definition at line 44 of file standard_colors.cpp.

◆ SIZE_15

const int font::SIZE_15 = 15 * (SIZE_NORMAL / 17)

Definition at line 28 of file constants.cpp.

Referenced by display_chat_manager::add_chat_message().

◆ SIZE_BUTTON

const int font::SIZE_BUTTON = 16 * (SIZE_NORMAL / 17)

Definition at line 25 of file constants.cpp.

◆ SIZE_BUTTON_SMALL

const int font::SIZE_BUTTON_SMALL = 14 * (SIZE_NORMAL / 17)

Definition at line 26 of file constants.cpp.

Referenced by display::create_buttons().

◆ SIZE_FLOAT_LABEL

const int font::SIZE_FLOAT_LABEL = 24 * (SIZE_NORMAL / 17)

Definition at line 32 of file constants.cpp.

Referenced by display::announce(), and game_display::float_label().

◆ SIZE_LARGE

const int font::SIZE_LARGE = 20 * (SIZE_NORMAL / 17)

Definition at line 30 of file constants.cpp.

Referenced by CVideo::set_help_string().

◆ SIZE_NORMAL

const int font::SIZE_NORMAL = 17

Definition at line 20 of file constants.cpp.

Referenced by terrain_label::draw(), and gui::floating_textbox::show().

◆ SIZE_PLUS

const int font::SIZE_PLUS = 18 * (SIZE_NORMAL / 17)

Definition at line 29 of file constants.cpp.

Referenced by display::set_diagnostic().

◆ SIZE_SMALL

const int font::SIZE_SMALL = 15 * (SIZE_NORMAL / 17)

◆ SIZE_TINY

const int font::SIZE_TINY = 13 * (SIZE_NORMAL / 17)

Definition at line 23 of file constants.cpp.

◆ SIZE_TITLE

const int font::SIZE_TITLE = 22 * (SIZE_NORMAL / 17)

Definition at line 31 of file constants.cpp.

Referenced by gui::dialog_frame::draw_title(), and gui::dialog_frame::top_padding().

◆ SIZE_XLARGE

const int font::SIZE_XLARGE = 36 * (SIZE_NORMAL / 17)

Definition at line 33 of file constants.cpp.

◆ TITLE_COLOR

const color_t font::TITLE_COLOR {186, 172, 125}

◆ unicode_bullet

const std::string font::unicode_bullet = "•"

◆ unicode_em_dash

const std::string font::unicode_em_dash = "—"

◆ unicode_en_dash

const std::string font::unicode_en_dash = "–"

◆ unicode_figure_dash

const std::string font::unicode_figure_dash = "‒"

◆ unicode_minus

const std::string font::unicode_minus = "-"

◆ unicode_multiplication_sign

const std::string font::unicode_multiplication_sign = "×"

◆ unit_type_color

const color_t font::unit_type_color {245, 230, 193}

◆ weapon_color

const color_t font::weapon_color {245, 230, 193}

◆ weapon_details_color

const color_t font::weapon_details_color {196, 176, 147}

◆ weapon_details_sep

const std::string font::weapon_details_sep = "–"

◆ weapon_numbers_sep

const std::string font::weapon_numbers_sep = "×"

◆ YELLOW_COLOR

const color_t font::YELLOW_COLOR {255, 255, 0 }