1 /* 2 sdlfont.h 3 4 Copyright (C) 2010-2019 Amf 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2 of the License, or 9 (at your option) any later version. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with this program; if not, write to the Free Software 18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 */ 20 21 /* UTF8 arrow symbols */ 22 #define ARROW_UP "\xe2\x96\xb2" 23 #define ARROW_DOWN "\xe2\x96\xbc" 24 #define ARROW_LEFT "\xe2\x97\x80" 25 #define ARROW_RIGHT "\xe2\x96\xb6" 26 27 #define COLOUR_BLACK 0 28 #define COLOUR_RED 1 29 #define COLOUR_GREEN 2 30 #define COLOUR_YELLOW 3 31 #define COLOUR_BLUE 4 32 #define COLOUR_MAGENTA 5 33 #define COLOUR_CYAN 6 34 #define COLOUR_WHITE 7 35 36 #define COLOUR_LIGHT 8 37 #define COLOUR_BOLD 16 38 39 void font_init(); 40 void font_resize(); 41 void font_set_size(int size); 42 int font_calculate_width(char *text, int cache); 43 SDL_Surface* font_render(char *text, int foreground); 44 void font_box(int x, int y, int w, int h, int c); 45 46