Under appreciated engine features: Custom Fonts

Under appreciated engine features: Custom Fonts

Various things about Spring that do not fit in any of the other forums listed below, including forum rules.

Moderator: Moderators

Post Reply
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Under appreciated engine features: Custom Fonts

Post by Beherith »

Imo many games could use stuff nicer than sans bold, and theres no shortage of options:

You can set your font in springsettings.cfg

Code: Select all

FontCharFirst=32
FontCharLast=255
FontOutlineWeight=25
FontOutlineWidth=3
FontSize=23
SmallFontFile=fonts/chintzy.ttf
SmallFontOutlineWeight=10
SmallFontOutlineWidth=2
SmallFontSize=14
But can this be done mod side?

Image

Image

Image

Image
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Under appreciated engine features: Custom Fonts

Post by Regret »

This topic containing request for forbidden information is relevant to my interests.
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Re: Under appreciated engine features: Custom Fonts

Post by SinbadEV »

I found this awesome font way back when that was basically an old Namco style 8pixel by 8 pixel font except done as a TrueTypeFont with rounded off corners... really excellent fixed width font... I can't seem to find it anymore but it would have been great to use as the small font.
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Re: Under appreciated engine features: Custom Fonts

Post by Neddie »

More specifically, can we put it on a ModOption toggle and/or have it set with lua in game, and can we have custom fonts per side? That could add a lot to our coming 1944 UI.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Under appreciated engine features: Custom Fonts

Post by jK »

You can change it modside,
BUT
Lua can use custom fonts for a long time now!
And changing the font of gl.Text() would do this for all mods, and it would override the user's decision -> don't want!
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Under appreciated engine features: Custom Fonts

Post by Argh »

I'm with jK. You can do whatever you want with the new font system; for a practical example, see SaveGame, which uses custom fonts throughout.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Under appreciated engine features: Custom Fonts

Post by Beherith »

Would you be so kind as to post the command needed to override the system fonts in the mod?
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Re: Under appreciated engine features: Custom Fonts

Post by Caydr »

^^^^^^^^^
Combine this:
Argh wrote:I'm with jK. You can do whatever you want with the new font system; for a practical example, see SaveGame, which uses custom fonts throughout.
With tweaks to CA's layout file?

Nice-looking map.
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Under appreciated engine features: Custom Fonts

Post by Jazcash »

Some nice screenies showing your tooltip not expanding there Beh :P I was gonna take some screenies to show you myself but you did it before me :-)
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Under appreciated engine features: Custom Fonts

Post by Argh »

Would you be so kind as to post the command needed to override the system fonts in the mod?
You don't do that at all. Instead, you can give every Widget / Gadget one or more fully custom fonts, e.g. like this, where that writing isn't a static bitmap, but is a font that adjusts according to screen resolution for maximum smoothness:

ImageIOW, why just have one font, when your project can have many?
Attachments
screen00005.jpg
(24.17 KiB) Downloaded 2 times
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Under appreciated engine features: Custom Fonts

Post by Jazcash »

Does this change the loadscreen font? I'd really like to see that die.
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Under appreciated engine features: Custom Fonts

Post by Regret »

This is like deja vu, I was met with similar idiocy when I asked as to how to do this some time ago. I don't get the taboo about it. Just answer the question or don't post something completely different.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Under appreciated engine features: Custom Fonts

Post by Forboding Angel »

JAZCASH wrote:Does this change the loadscreen font? I'd really like to see that die.
Seconded.
User avatar
hunterw
Posts: 1838
Joined: 14 May 2006, 12:22

Re: Under appreciated engine features: Custom Fonts

Post by hunterw »

:shock: all it needs is some splatty sand blending the sand with the rock
Post Reply

Return to “General Discussion”