How do I override Spring's Default Font?

How do I override Spring's Default Font?

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

How do I override Spring's Default Font?

Post by Forboding Angel »

Grepping all over the place for freesans is getting me nowhere. I've looked in basecontent. I've looked in Evo's core files I don't know how many times.

Either I'm blind or it's somewhere I haven't looked yet.

HaoduzI?
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: How do I override Spring's Default Font?

Post by FLOZi »

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: How do I override Spring's Default Font?

Post by Forboding Angel »

Wait a sec... Font is a springsettings var?
*Surprised pikachu*

That's pretty awesome. Thanks!
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: How do I override Spring's Default Font?

Post by Forboding Angel »

Ok, so how do I point to a font file that is in the game archive? It seems treat the folder that spring.exe is run from as ./
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: How do I override Spring's Default Font?

Post by Silentwings »

You're changing the default font for Spring there. That's a global property, not a game specific property, so it doesn't assume that any particular game is installed -> it shouldn't be assumed to come from within a game archive. I guess that the VFS is not even loaded at some points where Springs default font is used (e.g. Engines own menu to choose game/map).

Any filepath works though, https://springrts.com/wiki/Springsettings.cfg#FontFile
raaar
Metal Factions Developer
Posts: 1094
Joined: 20 Feb 2010, 12:17

Re: How do I override Spring's Default Font?

Post by raaar »

So if a user plays a game that overrides that, then plays another game that doesn't, he'll get the modified font?
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: How do I override Spring's Default Font?

Post by Forboding Angel »

The way it is set up is that it is completely user-side.

It also only effects spring itself. Everything else is handled in game in-mod.

Source: Gave myself a shitty crash course in spring and fonts for the past 2 days and am still slightly confused.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: How do I override Spring's Default Font?

Post by FLOZi »

Forboding Angel wrote: 11 Sep 2019, 06:32 Ok, so how do I point to a font file that is in the game archive? It seems treat the folder that spring.exe is run from as ./
It is in root/fonts

https://github.com/SpringMCLegacy/Sprin ... Gothic.ttf
Post Reply

Return to “Game Development”