-
-
Notifications
You must be signed in to change notification settings - Fork 896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature #6918: Add option to adjust font size separately from GUI size. #7003
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks broadly fine in principle...
a13bb51
to
0243291
Compare
Is it really intended, that the font size selection is relative to the interface size? With the current PR, if I select 'double size interface size' and 'double size font size', I end up with 4x font size compared to both settings set to 'normal'. As sprite fonts are the defaults, it should work for those as with non-sprite fonts, too. |
Without this PR, changing the interface size will also change the font size if the sprite font is used, but it will not affect the font size if a FreeType font is used. Are you proposing to change this behavior so that the interface size never affects the font size? |
@gregcarlin I would say exactly that behaviour should happen, as you have added the ability to (almost) independently set the font size. This may need existing text strings to be altered to indicate that the existing selection is for graphical/icon elements and no longer affects text? |
Sounds good, I'll get on it! |
0243291
to
774180f
Compare
I updated the behavior! I didn't change the strings because I wasn't sure what would be more clear and I think the current strings are fairly easy to understand. However, if someone has a specific recommendation I'd be more than happy to make the change. |
774180f
to
3a46738
Compare
@LordAro there is code that changes the width, it probably also needs to be changed to be based on (and happen on) font zoom instead of gui zoom. May well be other instances. |
@LordAro and @PeterN the issue seems to only appear if the font zoom is adjusted mid-game. If it's adjusted before a game is loaded the town names appear fine. This leads me to believe the issue is with timing (i.e. the width needs to be recalculated when the font zoom changes). I'll investigate further. |
524f08c
to
2ed0c58
Compare
Got it! Just needed to add a call to |
2ed0c58
to
8f6fede
Compare
Yay! Thanks! |
…enTTD#7003) Adds an option in the "Game Options" next to "Interface Size" called "Font Size". Available options are normal, double, and quad.
…enTTD#7003) Adds an option in the "Game Options" next to "Interface Size" called "Font Size". Available options are normal, double, and quad.
Adds an option in the "Game Options" next to "Interface Size" called "Font Size". Available options are normal, double, and quad. Tested with both freetype and sprite fonts. The only known hiccup is that I couldn't get sprite fonts to work properly past a complete "quad zoom". Eg. if the interface and font sizes are both set to double, the effective font size will be quad. Increasing either option further will not increase the font size. This works fine for freetype fonts though.
Thanks for taking a look! Super excited to be helping out, I love playing the game!
Fixes #6918