The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Typedefs | Enumerations | Functions | Variables
font Namespace Reference

Note: Specific to sdl_ttf. More...

Classes

struct  char_block_map
 
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  font_id
 
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  sdl_ttf
 
struct  subset_descriptor
 
class  text_cache
 
struct  text_chunk
 
class  text_surface
 
struct  ttf_record
 

Typedefs

typedef int subset_id
 
typedef std::map< std::string,
SDL_Rect > 
line_size_cache_map
 
typedef std::map< std::pair
< std::string, int >, TTF_Font * > 
open_font_cache
 

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 classes for get_font_families(). More...
 
enum  CACHE { CACHE_LOBBY, CACHE_GAME }
 

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)
 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...
 
static bool add_font_to_fontlist (const config &fonts_config, std::vector< font::subset_descriptor > &fontlist, const std::string &name)
 
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::const_iterator parse_markup (std::string::const_iterator i1, std::string::const_iterator i2, int *font_size, color_t *color, int *style)
 Parses the markup-tags at the front of a string. More...
 
std::string del_tags (const std::string &text)
 Copy string, but without tags at the beginning. More...
 
SDL_Rect text_area (const std::string &text, int size, int style=0)
 Calculate the size of a text (in pixels) if it were to be drawn. More...
 
SDL_Rect 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, int style=0)
 Function to draw text on a surface. More...
 
SDL_Rect 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, int style=0)
 wrapper of the previous function, gui can also be nullptr More...
 
bool is_format_char (char c)
 Determine if char is one of the special chars used as markup. More...
 
bool is_cjk_char (const ucs4::char_t ch)
 Determine if a ucs4::char_t is a CJK character. More...
 
static void cut_word (std::string &line, std::string &word, int font_size, int style, int max_width)
 
std::string word_wrap_text (const std::string &unwrapped_text, int font_size, int max_width, int max_height=-1, int max_lines=-1, bool partial_line=false)
 Wrap text. More...
 
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 (utils::string_view str)
 
std::string format_as_link (const std::string &link, color_t color)
 
std::ostream & operator<< (std::ostream &s, const PangoRectangle &rect)
 
static TTF_Font * open_font_impl (const std::string &, int)
 
static TTF_Font * open_font (const std::string &fname, int size)
 
static surface render_text (const std::string &text, int fontsize, const color_t &color, int style, bool use_markup)
 
surface get_rendered_text (const std::string &str, int size, const color_t &color, int style)
 
SDL_Rect draw_text_line (surface &gui_surface, const SDL_Rect &area, int size, const color_t &color, const std::string &text, int x, int y, bool use_tooltips, int style)
 
int get_max_height (int size)
 
int line_width (const std::string &line, int font_size, int style=TTF_STYLE_NORMAL)
 Determine the width of a line of text given a certain font size. More...
 
SDL_Rect line_size (const std::string &line, int font_size, int style=TTF_STYLE_NORMAL)
 Determine the size of a line of text given a certain font size. More...
 
std::string make_text_ellipsis (const std::string &text, int font_size, int max_width, int style=TTF_STYLE_NORMAL)
 If the text exceeds the specified max width, end it with an ellipsis (...) More...
 
void cache_mode (CACHE mode)
 
static void clear_fonts ()
 
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...
 
std::string span_color (const color_t &color)
 Retuns a Pango formatting string using the provided color_t object. 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 = 14
 
const int SIZE_TINY = 10 * SIZE_NORMAL / 14
 
const int SIZE_SMALL = 12 * SIZE_NORMAL / 14
 
const int SIZE_15 = 15 * SIZE_NORMAL / 14
 
const int SIZE_PLUS = 16 * SIZE_NORMAL / 14
 
const int SIZE_LARGE = 18 * SIZE_NORMAL / 14
 
const int SIZE_TITLE = 20 * SIZE_NORMAL / 14
 
const int SIZE_XLARGE = 24 * SIZE_NORMAL / 14
 
const size_t max_text_line_width = 4096
 
const std::string ellipsis = "..."
 
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 = "–"
 
t_string family_order_sans
 
t_string family_order_mono
 
const char LARGE_TEXT ='*'
 Standard markups for color, size, font, images. More...
 
const char SMALL_TEXT ='`'
 
const char BOLD_TEXT ='~'
 
const char NORMAL_TEXT ='{'
 
const char NULL_MARKUP ='^'
 
const char BLACK_TEXT ='}'
 
const char GRAY_TEXT ='|'
 
const char GOOD_TEXT ='@'
 
const char BAD_TEXT ='#'
 
const char GREEN_TEXT ='@'
 
const char RED_TEXT ='#'
 
const char COLOR_TEXT ='<'
 
const char IMAGE ='&'
 
static std::map< font_id,
ttf_record
font_table
 
static std::vector< std::string > font_names
 
static std::vector< std::string > bold_names
 
static std::vector< std::string > italic_names
 
static char_block_map char_blocks
 
static std::map< int, std::map
< int, line_size_cache_map > > 
line_size_cache
 
open_font_cache open_fonts
 
const color_t NORMAL_COLOR {221, 221, 221}
 
const color_t GRAY_COLOR {119, 119, 119}
 
const color_t LOBBY_COLOR {187, 187, 187}
 
const color_t GOOD_COLOR {0 , 255, 0 }
 
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 {166, 146, 117}
 
const color_t inactive_details_color {146, 146, 146}
 
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

Note: Specific to sdl_ttf.

Graphical text output.

Collection of helper functions relating to Pango formatting.

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.

Typedef Documentation

typedef std::map<std::string,SDL_Rect> font::line_size_cache_map

Definition at line 135 of file sdl_ttf.cpp.

typedef std::map<std::pair<std::string, int>, TTF_Font*> font::open_font_cache

Definition at line 140 of file sdl_ttf.cpp.

typedef int font::subset_id

Definition at line 31 of file font_id.hpp.

Enumeration Type Documentation

Enumerator
LEFT_ALIGN 
CENTER_ALIGN 
RIGHT_ALIGN 

Definition at line 31 of file floating_label.hpp.

Enumerator
CACHE_LOBBY 
CACHE_GAME 

Definition at line 59 of file sdl_ttf.hpp.

Font classes for get_font_families().

Enumerator
FONT_SANS_SERIF 
FONT_MONOSPACE 

Definition at line 25 of file font_options.hpp.

Enumerator
ANCHOR_LABEL_SCREEN 
ANCHOR_LABEL_MAP 

Definition at line 33 of file floating_label.hpp.

Function Documentation

int font::add_floating_label ( const floating_label &  flabel)
static bool font::add_font_to_fontlist ( const config fonts_config,
std::vector< font::subset_descriptor > &  fontlist,
const std::string &  name 
)
static

Definition at line 84 of file font_config.cpp.

References config::find_child().

Referenced by load_font_config().

void font::cache_mode ( CACHE  mode)

Definition at line 469 of file sdl_ttf.cpp.

References CACHE_LOBBY, and font::text_cache::resize().

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::file_exists(), game_config::path, and WRN_FT.

Referenced by font::sdl_ttf::set_font_list().

static void font::clear_fonts ( )
static

Definition at line 492 of file sdl_ttf.cpp.

References font::char_block_map::cbmap, and i.

Referenced by font::sdl_ttf::set_font_list(), and font::sdl_ttf::~sdl_ttf().

static void font::cut_word ( std::string &  line,
std::string &  word,
int  font_size,
int  style,
int  max_width 
)
static
std::string font::del_tags ( const std::string &  text)

Copy string, but without tags at the beginning.

Definition at line 136 of file marked-up_text.cpp.

References utils::join(), parse_markup(), and utils::split().

Referenced by gui::menu::basic_sorter::less().

void font::draw_floating_labels ( surface  screen)

Definition at line 286 of file floating_label.cpp.

References i.

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

SDL_Rect font::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,
int  style = 0 
)

Function to draw 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.

Some very basic 'markup' will be done on the text:

  • any line beginning in # will be displayed in BAD_COLOR (red)
  • any line beginning in @ will be displayed in GOOD_COLOR (green)
  • any line beginning in + will be displayed with size increased by 2
  • any line beginning in - will be displayed with size decreased by 2
  • any line beginning with 0x0n will be displayed in the color of side n

The above special characters can be quoted using a C-style backslash.

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 153 of file marked-up_text.cpp.

References draw_text_line(), gui2::event::find(), parse_markup(), utf8::size(), and utils::unescape().

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

SDL_Rect font::draw_text ( CVideo gui,
const SDL_Rect &  area,
int  size,
const color_t color,
const std::string &  txt,
int  x,
int  y,
bool  use_tooltips,
int  style 
)

wrapper of the previous function, gui can also be nullptr

Definition at line 200 of file marked-up_text.cpp.

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

SDL_Rect font::draw_text_line ( surface gui_surface,
const SDL_Rect &  area,
int  size,
const color_t color,
const std::string &  text,
int  x,
int  y,
bool  use_tooltips,
int  style 
)
std::string font::escape_text ( const std::string &  text)
inline
std::string font::format_as_link ( const std::string &  link,
color_t  color 
)
inline

Definition at line 31 of file hyperlink.hpp.

References color_t::to_hex_string().

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

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 626 of file text.cpp.

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

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

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 40 of file text_formatting.cpp.

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

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

SDL_Rect font::get_floating_label_rect ( int  handle)
const t_string & font::get_font_families ( family_class  fclass = FONT_SANS_SERIF)

Returns the currently defined fonts.

Definition at line 168 of file font_config.cpp.

References family_order_mono, family_order_sans, and FONT_MONOSPACE.

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

int font::get_max_height ( int  size)
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 30 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().

surface font::get_rendered_text ( const std::string &  str,
int  size,
const color_t color,
int  style 
)
bool font::is_cjk_char ( const ucs4::char_t  ch)

Determine if a ucs4::char_t is a CJK character.

Return values
trueInput-char is a CJK char
falseInput-char is a not CJK char.

You can check these range at http://unicode.org/charts/ see the "East Asian Scripts" part. Notice that not all characters in that part is still in use today, so don't list them all here. Below are characters that I guess may be used in wesnoth translations.

Definition at line 227 of file marked-up_text.cpp.

Referenced by help::get_first_word().

bool font::is_format_char ( char  c)

Determine if char is one of the special chars used as markup.

Return values
trueInput-char is a markup-char.
falseInput-char is a normal char.

Definition at line 209 of file marked-up_text.cpp.

References BAD_TEXT, BLACK_TEXT, BOLD_TEXT, GOOD_TEXT, GRAY_TEXT, NORMAL_TEXT, NULL_MARKUP, and SMALL_TEXT.

Referenced by word_wrap_text().

SDL_Rect font::line_size ( const std::string &  line,
int  font_size,
int  style = TTF_STYLE_NORMAL 
)

Determine the size of a line of text given a certain font size.

Similar to line_width, but for both coordinates.

Definition at line 421 of file sdl_ttf.cpp.

References gui2::cache, gui::font_size, font::text_surface::height(), i, s, and font::text_surface::width().

Referenced by cut_word(), line_width(), and word_wrap_text().

int font::line_width ( const std::string &  line,
int  font_size,
int  style = TTF_STYLE_NORMAL 
)

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

The font type used is the default wesnoth font type.

Definition at line 416 of file sdl_ttf.cpp.

References line_size().

Referenced by help::help_text_area::add_text_item(), gui::textbox::add_text_line(), draw_text_line(), make_text_ellipsis(), help::unit_topic_generator::operator()(), help::unit_topic_generator::push_header(), help::push_tab_pair(), CVideo::set_help_string(), and word_wrap_text().

bool font::load_font_config ( )
bool font::looks_like_url ( utils::string_view  str)
inline
std::string font::make_text_ellipsis ( const std::string &  text,
int  font_size,
int  max_width,
int  style 
)
void font::move_floating_label ( int  handle,
double  xmove,
double  ymove 
)

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

Definition at line 219 of file floating_label.cpp.

References i.

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

static TTF_Font* font::open_font ( const std::string &  fname,
int  size 
)
static

Definition at line 148 of file sdl_ttf.cpp.

References open_font_impl().

Referenced by font::sdl_ttf::get_font().

static TTF_Font * font::open_font_impl ( const std::string &  fname,
int  size 
)
static
std::ostream& font::operator<< ( std::ostream &  s,
const PangoRectangle &  rect 
)
inline

Definition at line 22 of file stream_ops.hpp.

References s.

std::string::const_iterator font::parse_markup ( std::string::const_iterator  i1,
std::string::const_iterator  i2,
int *  font_size,
color_t color,
int *  style 
)
int font::relative_size ( int  size)
inline
void font::remove_floating_label ( int  handle)
static surface font::render_text ( const std::string &  text,
int  fontsize,
const color_t color,
int  style,
bool  use_markup 
)
static
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 227 of file floating_label.cpp.

References ANCHOR_LABEL_MAP, and i.

Referenced by display::scroll().

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

Definition at line 48 of file escape.hpp.

References c.

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

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

hides or shows a floating label

Definition at line 248 of file floating_label.cpp.

References i.

Referenced by terrain_label::calculate_shroud().

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

Definition at line 31 of file font_options.hpp.

References FONT_MONOSPACE, and FONT_SANS_SERIF.

SDL_Rect font::text_area ( const std::string &  text,
int  size,
int  style = 0 
)

Calculate the size of a text (in pixels) if it were to be drawn.

Definition at line 147 of file marked-up_text.cpp.

References draw_text(), and NORMAL_COLOR.

Referenced by gui::menu::draw_row(), and gui::label::update_label_size().

void font::undraw_floating_labels ( surface  screen)

Definition at line 303 of file floating_label.cpp.

References i.

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

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

Definition at line 610 of file text.cpp.

Referenced by from_cairo_format().

std::string font::word_wrap_text ( const std::string &  unwrapped_text,
int  font_size,
int  max_width,
int  max_height = -1,
int  max_lines = -1,
bool  partial_line = false 
)

Variable Documentation

const color_t font::BAD_COLOR {255, 0 , 0 }
const color_t font::bad_dmg_color {250, 140, 80 }
const char font::BAD_TEXT ='#'

Definition at line 44 of file marked-up_text.cpp.

Referenced by is_format_char(), and parse_markup().

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

Definition at line 31 of file standard_colors.cpp.

Referenced by help::string_to_color().

const color_t font::BLACK_COLOR {0 , 0 , 0 }
const char font::BLACK_TEXT ='}'

Definition at line 43 of file marked-up_text.cpp.

Referenced by is_format_char(), and parse_markup().

std::vector<std::string> font::bold_names
static

Definition at line 64 of file sdl_ttf.cpp.

const char font::BOLD_TEXT ='~'

Definition at line 41 of file marked-up_text.cpp.

Referenced by is_format_char(), and parse_markup().

const color_t font::BUTTON_COLOR {186, 172, 125}
char_block_map font::char_blocks
static

Definition at line 132 of file sdl_ttf.cpp.

const char font::COLOR_TEXT ='<'

Definition at line 46 of file marked-up_text.cpp.

Referenced by parse_markup().

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

Definition at line 33 of file standard_colors.cpp.

Referenced by gui::label::get_color().

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

Definition at line 35 of file constants.cpp.

Referenced by utils::ellipsis_truncate(), and make_text_ellipsis().

t_string font::family_order_mono

Definition at line 101 of file font_config.cpp.

Referenced by get_font_families().

t_string font::family_order_sans

Definition at line 100 of file font_config.cpp.

Referenced by get_font_families(), and load_font_config().

std::vector<std::string> font::font_names
static

Definition at line 63 of file sdl_ttf.cpp.

std::map<font_id, ttf_record> font::font_table
static

Definition at line 62 of file sdl_ttf.cpp.

const color_t font::GOOD_COLOR {0 , 255, 0 }
const color_t font::good_dmg_color {130, 240, 50 }
const char font::GOOD_TEXT ='@'

Definition at line 44 of file marked-up_text.cpp.

Referenced by is_format_char(), and parse_markup().

const color_t font::GRAY_COLOR {119, 119, 119}
const char font::GRAY_TEXT ='|'

Definition at line 43 of file marked-up_text.cpp.

Referenced by is_format_char(), and parse_markup().

const char font::GREEN_TEXT ='@'

Definition at line 45 of file marked-up_text.cpp.

const char font::IMAGE ='&'

Definition at line 46 of file marked-up_text.cpp.

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

Definition at line 41 of file standard_colors.cpp.

Referenced by unit_abilities().

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

Definition at line 40 of file standard_colors.cpp.

Referenced by attack_info().

const inverse_table font::inverse_table_
static

Definition at line 604 of file text.cpp.

std::vector<std::string> font::italic_names
static

Definition at line 65 of file sdl_ttf.cpp.

const color_t font::LABEL_COLOR {107, 140, 255}
const char font::LARGE_TEXT ='*'

Standard markups for color, size, font, images.

Definition at line 40 of file marked-up_text.cpp.

std::map<int,std::map<int,line_size_cache_map> > font::line_size_cache
static

Definition at line 138 of file sdl_ttf.cpp.

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

Definition at line 22 of file standard_colors.cpp.

const size_t font::max_text_line_width = 4096

Definition at line 32 of file constants.cpp.

Referenced by font::text_surface::get_surfaces().

const color_t font::NORMAL_COLOR {221, 221, 221}
const char font::NORMAL_TEXT ='{'

Definition at line 41 of file marked-up_text.cpp.

Referenced by is_format_char(), and parse_markup().

const char font::NULL_MARKUP ='^'

Definition at line 42 of file marked-up_text.cpp.

Referenced by is_format_char(), and parse_markup().

open_font_cache font::open_fonts

Definition at line 141 of file sdl_ttf.cpp.

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

Definition at line 28 of file standard_colors.cpp.

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

Definition at line 43 of file standard_colors.cpp.

const char font::RED_TEXT ='#'

Definition at line 45 of file marked-up_text.cpp.

const int font::SIZE_15 = 15 * SIZE_NORMAL / 14

Definition at line 25 of file constants.cpp.

const int font::SIZE_LARGE = 18 * SIZE_NORMAL / 14

Definition at line 27 of file constants.cpp.

Referenced by CVideo::set_help_string().

const int font::SIZE_NORMAL = 14

Definition at line 19 of file constants.cpp.

Referenced by display_chat_manager::add_chat_message(), and terrain_label::draw().

const int font::SIZE_PLUS = 16 * SIZE_NORMAL / 14

Definition at line 26 of file constants.cpp.

Referenced by display::set_diagnostic(), and gui::floating_textbox::show().

const int font::SIZE_SMALL = 12 * SIZE_NORMAL / 14
const int font::SIZE_TINY = 10 * SIZE_NORMAL / 14

Definition at line 22 of file constants.cpp.

const int font::SIZE_TITLE = 20 * SIZE_NORMAL / 14

Definition at line 28 of file constants.cpp.

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

const int font::SIZE_XLARGE = 24 * SIZE_NORMAL / 14

Definition at line 29 of file constants.cpp.

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

const char font::SMALL_TEXT ='`'

Definition at line 40 of file marked-up_text.cpp.

Referenced by is_format_char(), and parse_markup().

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

Definition at line 29 of file standard_colors.cpp.

Referenced by gui::dialog_frame::draw_title().

const std::string font::unicode_bullet = "•"
const std::string font::unicode_em_dash = "—"
const std::string font::unicode_en_dash = "–"
const std::string font::unicode_figure_dash = "‒"
const std::string font::unicode_minus = "-"
const std::string font::unicode_multiplication_sign = "×"
const color_t font::unit_type_color {245, 230, 193}
const color_t font::weapon_color {245, 230, 193}
const color_t font::weapon_details_color {166, 146, 117}
const std::string font::weapon_details_sep = "–"

Definition at line 45 of file constants.cpp.

Referenced by attack_info(), and gui2::unit_preview_pane::print_attack_details().

const std::string font::weapon_numbers_sep = "×"
const color_t font::YELLOW_COLOR {255, 255, 0 }