loads all game fonts.
| 156 | |
| 157 | // loads all game fonts. |
| 158 | void LoadAllFonts() { |
| 159 | grfont_Reset(); |
| 160 | |
| 161 | atexit(FreeAuxFontData); |
| 162 | |
| 163 | if (Hud_font_template_init) { |
| 164 | grfont_FreeTemplate(&Hud_font_template); |
| 165 | } |
| 166 | |
| 167 | // Load the fonts (except HUD) |
| 168 | SMALL_FONT = LoadFont("briefing.fnt"); |
| 169 | BIG_FONT = LoadFont("bbriefing.fnt"); |
| 170 | MENU_FONT = LoadFont("newmenu.fnt"); |
| 171 | SMALL_UI_FONT = LoadFont("smallui.fnt"); |
| 172 | BIG_UI_FONT = LoadFont("largeui.fnt"); |
| 173 | |
| 174 | // Load the HUD font |
| 175 | HUD_font_resolution = HUD_FONT_LOWRES; |
| 176 | HUD_FONT = LoadFont(HUD_FONT_FILE); |
| 177 | if (!grfont_LoadTemplate(HUD_FONT_FILE, &Hud_font_template)) |
| 178 | Error(TXT_ERRNOFONT, HUD_FONT_FILE); |
| 179 | Hud_font_template_init = true; |
| 180 | } |
| 181 | |
| 182 | // If screen width greater than this, use the superhires fonts |
| 183 | #define SUPERHIRES_THRESHOLD_W 1024 |
no test coverage detected