New fonts

This commit is contained in:
2025-12-06 11:09:12 +01:00
parent ffdb67ce9b
commit fff14fe3e1
5 changed files with 9 additions and 7 deletions

BIN
assets/fonts/Exo2.ttf Normal file

Binary file not shown.

BIN
assets/fonts/Orbitron.ttf Normal file

Binary file not shown.

View File

@ -6,7 +6,7 @@ Fullscreen=1
[Audio]
Music=1
Sound=0
Sound=1
[Gameplay]
SmoothScroll=1

View File

@ -580,12 +580,13 @@ int main(int, char **)
SDL_GetError());
}
FontAtlas font;
font.init("FreeSans.ttf", 24);
// Load PressStart2P font for loading screen and retro UI elements
// Primary UI font (Orbitron) used for major UI text: buttons, loading, HUD
FontAtlas pixelFont;
pixelFont.init("assets/fonts/PressStart2P-Regular.ttf", 16);
pixelFont.init("assets/fonts/Orbitron.ttf", 22);
// Secondary font (Exo2) used for longer descriptions, settings, credits
FontAtlas font;
font.init("assets/fonts/Exo2.ttf", 20);
ScoreManager scores;
std::atomic<bool> scoresLoadComplete{false};

View File

@ -113,7 +113,8 @@ void OptionsState::render(SDL_Renderer* renderer, float logicalScale, SDL_Rect l
UIRenderer::drawSciFiPanel(renderer, panel);
FontAtlas* retroFont = ctx.pixelFont ? ctx.pixelFont : ctx.font;
// For options/settings we prefer the secondary (Exo2) font for longer descriptions.
FontAtlas* retroFont = ctx.font ? ctx.font : ctx.pixelFont;
if (!logoTexture && retroFont) {
retroFont->draw(renderer, panel.x + 24.0f, panel.y + 24.0f, "OPTIONS", 2.0f, {255, 230, 120, 255});