Skip to content
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

UI font suddenly changes to smaller font size #4807

Open
cwyss opened this issue Feb 23, 2020 · 4 comments
Open

UI font suddenly changes to smaller font size #4807

cwyss opened this issue Feb 23, 2020 · 4 comments

Comments

@cwyss
Copy link
Contributor

@cwyss cwyss commented Feb 23, 2020

Observed behaviour

While in flight-ui, when using the system overview window, the font used there and in the reticule and planetary info suddenly changes to a smaller font size, which is harder to read.

Similar thing happens when in main menu - load game dialog: while hovering the list of saved games with the mouse, eventually the font used in the list changes to a smaller font size.

Expected behaviour

Font stays at the original, bigger size

Steps to reproduce in flight-ui

  1. Start at Mars, undock.
  2. Open system overview window
  3. Alternatively
  • click on "Toggle showing stations", or
  • select Earth, then Moon
  1. Observe change of font size

My pioneer version (and OS):
current master e255171
OS & DE: Debian 9.12 (as well as 10.2) with Gnome
pioneer gfx config: fullscreen 1920x1080

This bug appears to have been introduced in 8ff5080, which is in fact related to font management. The version before, 105d06e, does not have this bug.

@vakhoir

This comment has been minimized.

Copy link
Contributor

@vakhoir vakhoir commented Feb 23, 2020

What language settings are you playing on? Chances are "it's not a bug, it's a feature", the game switches to a font it can fully support, when encountering a character it can't print. Arguably the best solution would be to switch to font for just that one character, I think that was the original idea behind our code, but that's just not what it does or did before the fix.

If no one else takes a stab at this, I'll try to take care of it after I finish the Missions View, in the mean time, I think this problem sure beats having that memory leak we used to have.

@impaktor

This comment has been minimized.

Copy link
Member

@impaktor impaktor commented Feb 23, 2020

If no one else takes a stab at this, I'll try to take care of it after I finish

It's all your's

the game switches to a font it can fully support,

Not knowing how things work, but would it be possible to scan all characters to find the "best one" for setting font size? Just throwing the idea out there, incase it inspires some solution.

@vakhoir

This comment has been minimized.

Copy link
Contributor

@vakhoir vakhoir commented Feb 23, 2020

Not knowing how things work, but would it be possible to scan all characters to find the "best one" for setting font size? Just throwing the idea out there, incase it inspires some solution.

From what I understand of the code, that was the idea in how fonts are implemented in pigui, but if memory serves, a lot of the font magic takes place in the ImGui core. There hopefully is a way to have it actually work but I'd need to focus on it fully to come up with something

@cwyss

This comment has been minimized.

Copy link
Contributor Author

@cwyss cwyss commented Feb 23, 2020

What language settings are you playing on? Chances are "it's not a bug, it's a feature", the game switches to a font it can fully support, when encountering a character it can't print.

I am playing plain English, i.e., I never changed language from the default. (Apparently, there are two "English" entries in the language list...)

But your comment nailed it, I think: When the stations of Moon are revealed, there is this "Mariasuriru" station which has some accent-like thing on the second "i", which is likely the character in question that causes the font change. 😄
And this would also explain the change in the load games dialog since I have there a saved game, with the ship docked at Mariasuriru.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.