Freeciv-3.3
|
Go to the source code of this file.
Data Structures | |
struct | utf8_str |
Macros | |
#define | SF_CENTER 0x10 |
#define | SF_CENTER_RIGHT 0x20 |
#define | FREEUTF8STR(pstr) |
#define | create_utf8_from_char(string_in, ptsize) |
#define | create_utf8_from_char_fonto(string_in, fonto) |
Typedefs | |
typedef struct utf8_str | utf8_str |
Enumerations | |
enum | font_origin { FONTO_DEFAULT , FONTO_DEFAULT_PLUS , FONTO_ATTENTION , FONTO_ATTENTION_PLUS , FONTO_HEADING , FONTO_BIG , FONTO_MAX } |
Functions | |
utf8_str * | create_utf8_str_fonto (char *in_text, size_t n_alloc, enum font_origin origin) |
utf8_str * | create_utf8_str (char *in_text, size_t n_alloc, Uint16 ptsize) |
utf8_str * | copy_chars_to_utf8_str (utf8_str *pstr, const char *pchars) |
bool | convert_utf8_str_to_const_surface_width (utf8_str *pstr, int width) |
int | write_utf8 (SDL_Surface *dest, Sint16 x, Sint16 y, utf8_str *pstr) |
SDL_Surface * | create_text_surf_from_utf8 (utf8_str *pstr) |
SDL_Surface * | create_text_surf_smaller_than_w (utf8_str *pstr, int w) |
void | utf8_str_size (utf8_str *pstr, SDL_Rect *fill) |
void | change_ptsize_utf8 (utf8_str *pstr, Uint16 new_ptsize) |
void | change_fonto_utf8 (utf8_str *pstr, enum font_origin origin) |
void | unload_font (Uint16 ptsize) |
void | free_font_system (void) |
Definition at line 103 of file gui_string.h.
Definition at line 108 of file gui_string.h.
#define SF_CENTER 0x10 |
Definition at line 40 of file gui_string.h.
#define SF_CENTER_RIGHT 0x20 |
Definition at line 41 of file gui_string.h.
Enumerator | |
---|---|
FONTO_DEFAULT | |
FONTO_DEFAULT_PLUS | |
FONTO_ATTENTION | |
FONTO_ATTENTION_PLUS | |
FONTO_HEADING | |
FONTO_BIG | |
FONTO_MAX |
Definition at line 64 of file gui_string.h.
void change_fonto_utf8 | ( | utf8_str * | pstr, |
enum font_origin | origin | ||
) |
Change font size of text to that from given origin.
Definition at line 584 of file gui_string.c.
Change font size of text.
Definition at line 559 of file gui_string.c.
Wrap text to make it fit to given screen width.
Definition at line 449 of file gui_string.c.
Convert char array to utf8_str. Pointer to target string is needed as parameter, but also returned for convenience.
Definition at line 251 of file gui_string.c.
SDL_Surface * create_text_surf_from_utf8 | ( | utf8_str * | pstr | ) |
Generic function to create surface with any kind of text, single line or multiline, drawn.
Definition at line 425 of file gui_string.c.
SDL_Surface * create_text_surf_smaller_than_w | ( | utf8_str * | pstr, |
int | w | ||
) |
Create surface with text drawn to it. Wrap text as needed to make it fit in given width.
Definition at line 539 of file gui_string.c.
Create utf8_str struct with ptsize font. If ptsize is zero, use theme's default font size.
Font will be loaded or aliased with existing font of that size. in_text must be allocated in memory (fc_malloc() / fc_calloc())
Definition at line 206 of file gui_string.c.
utf8_str * create_utf8_str_fonto | ( | char * | in_text, |
size_t | n_alloc, | ||
enum font_origin | origin | ||
) |
Create utf8_str struct with font size from given origin.
Font will be loaded or aliased with existing font of that size. in_text must be allocated in memory (fc_malloc() / fc_calloc())
Definition at line 241 of file gui_string.c.
Free all fonts.
Definition at line 698 of file gui_string.c.
Free font of given pointsize.
Definition at line 653 of file gui_string.c.
Adjust font sizes for small screen. Calculate display size of string.
Definition at line 106 of file gui_string.c.
int write_utf8 | ( | SDL_Surface * | dest, |
Sint16 | x, | ||
Sint16 | y, | ||
utf8_str * | pstr | ||
) |
Blit text to surface.
Definition at line 276 of file gui_string.c.