2.6 gtk3 Fonts issues: Resets to default size

You can get help here if Freeciv doesn't start on your computer, or if you keep getting fatal errors while playing etc.
Post Reply
Hans Lemurson
Veteran
Posts: 108
Joined: Mon Aug 22, 2016 10:25 pm

2.6 gtk3 Fonts issues: Resets to default size

Post by Hans Lemurson »

Whenever I load a new texture pack or restart the FreeCiv client, the font-sizes for the City-Bar keep resetting to size 10. I was trying to shrink the font to make the city bar smaller and less obtrusive, but every time I start the game I'm faced with big full-sized letters.

Any notion why the gtk client might be resetting to default values?
Wishes he could convert Civ2's scenarios to FreeCiv...
But instead, he made his own tileset variants, RoundSquare and Sextant-enHANSed, and refuses to play on anything else. Check them out!
User avatar
JTN
Elite
Posts: 473
Joined: Wed Jan 30, 2013 12:15 am

Re: 2.6 gtk3 Fonts issues: Resets to default size

Post by JTN »

I've reproduced your observation with 2.6, and I think I understand what is going on, if not why.

When I change the city name and production font sizes in the options UI, I see my settings being saved to and loaded from the options file fine, and my size shows up in the UI after a reload, but is ignored.

What I see happening is that each tileset also has an opinion on the sizes of these fonts. e.g. in amplio2.tilespec:

Code: Select all

; Font size (points) to use to draw city names and productions:
city_names_font_size = 10
city_productions_font_size = 8
It is these which take effect on entering a new game (when the tileset is loaded), overriding your setting. When you change the setting, that temporarily overrides the tileset (loading a new tileset resets this).

This seems a bit incoherent -- why have we apparently deliberately provided two sets of configurability which fight with each other? I haven't dug into the history to see if there's some deeper logic. I suppose it might be a longstanding issue that the changes to tileset selection in 2.6 have made more obvious (I haven't played with 2.5).
User avatar
JTN
Elite
Posts: 473
Joined: Wed Jan 30, 2013 12:15 am

Re: 2.6 gtk3 Fonts issues: Resets to default size

Post by JTN »

Hans Lemurson
Veteran
Posts: 108
Joined: Mon Aug 22, 2016 10:25 pm

Re: 2.6 gtk3 Fonts issues: Resets to default size

Post by Hans Lemurson »

I remember fiddling with the font sizes in the tilespec files when playing with graphics for a 2.5 tileset, but I couldn't find that setting in the tilespecs for the 2.6 tileset, so I was relying on the client font settings. Maybe I should look again.

But yes, it is an interesting puzzle for how these things should relate to one another. On the one hand it seems as though having everything centrally controlled from the client's Font settings is the sensible way to do things. But on the other hand, tilesets can vary wildly in size, and so when switching tilesets it's nice to have the text resize according to the specifications of the tileset rather than having to manually re-adjust every time.
Wishes he could convert Civ2's scenarios to FreeCiv...
But instead, he made his own tileset variants, RoundSquare and Sextant-enHANSed, and refuses to play on anything else. Check them out!
Post Reply