Loads the font and returns the handle. Exits with an error if the font can't be found.
| 145 | |
| 146 | // Loads the font and returns the handle. Exits with an error if the font can't be found. |
| 147 | int LoadFont(const char *font_name) { |
| 148 | int handle = grfont_Load(font_name); |
| 149 | if (handle == -1) |
| 150 | Error(TXT_ERRNOFONT, font_name); |
| 151 | |
| 152 | mprintf(0, "Font <%s> height = %d\n", font_name, grfont_GetHeight(handle)); |
| 153 | |
| 154 | return handle; |
| 155 | } |
| 156 | |
| 157 | // loads all game fonts. |
| 158 | void LoadAllFonts() { |
no test coverage detected