MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / LoadAllFonts

Function LoadAllFonts

Descent3/gamefont.cpp:158–180  ·  view source on GitHub ↗

loads all game fonts.

Source from the content-addressed store, hash-verified

156
157// loads all game fonts.
158void 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

Callers 2

InitEditGameSystemsFunction · 0.85
InitGraphicsFunction · 0.85

Calls 5

grfont_ResetFunction · 0.85
grfont_FreeTemplateFunction · 0.85
LoadFontFunction · 0.85
grfont_LoadTemplateFunction · 0.85
ErrorFunction · 0.85

Tested by

no test coverage detected