Page 1 of 1

2.6 gtk3 Fonts issues: Resets to default size

Posted: Fri Jun 15, 2018 4:09 am
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?

Re: 2.6 gtk3 Fonts issues: Resets to default size

Posted: Sat Jun 16, 2018 10:24 am
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).

Re: 2.6 gtk3 Fonts issues: Resets to default size

Posted: Sun Jun 17, 2018 10:33 am
by JTN

Re: 2.6 gtk3 Fonts issues: Resets to default size

Posted: Wed Jun 20, 2018 6:24 pm
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.