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

Fix: tell the user if a font fails to load and fallback is about to be used #8559

Merged
merged 2 commits into from Jan 13, 2021

Conversation

TrueBrain
Copy link
Member

Fixes #7615 (well, not really fixes, but informs the user better).

Motivation / Problem

When fonts fail to load, the user is not informed why and that it failed. Instead, system fallback is loaded, and that is all she wrote. Really frustrating for the user, as he would think he did the path wrong or something. None of that .. if only a single glyph is missing, all the fonts are rejected and the system fallback is used.

Description

So instead of doing stuff in silence, be a bit more talkative:

  • Report in console what character failed to render
  • Show a GUI error that the font failed, and that the system fallback is used

Hopefully that makes it a bit easier to debug font issues :)

Limitations

Checklist for review

Some things are not automated, and forgotten often. This list is a reminder for the reviewers.

  • The bug fix is important enough to be backported? (label: 'backport requested')
  • This PR affects the save game format? (label 'savegame upgrade')
  • This PR affects the GS/AI API? (label 'needs review: Script API')
    • ai_changelog.hpp, gs_changelog.hpp need updating.
    • The compatibility wrappers (compat_*.nut) need updating.
  • This PR affects the NewGRF API? (label 'needs review: NewGRF')

src/strings.cpp Show resolved Hide resolved
@TrueBrain TrueBrain changed the title Font weirdness Fix: tell the user if a font fails to load and fallback is about to be used Jan 12, 2021
…e used

Additionally, tell exactly why the font failed to load, which
glyph was missing from the font. This hopefully helps the user
a bit more in the right direction.
@LC-Zorg
Copy link

LC-Zorg commented Jan 12, 2021

(From the perspective of the average gamer)
I have not encountered this problem because...

  1. For a long time I didn't know that it is possible to change the font in the game.
  2. And when I found out about it, I didn't know how to do it.
  3. Later I knew, but today I forgot again how and where.

People familiar with how to change the font will likely benefit from this change. However, the vast majority of players don't know about this possibility.

This proposal is a completely different level of complexity of the work and it is probably not very revealing, but...
The option to select the type and size of fonts available in the settings window would be useful in the game. The current variant x1 / x2 / x4 rarely gives satisfactory results.

@TrueBrain
Copy link
Member Author

TrueBrain commented Jan 12, 2021

(From the perspective of the average gamer)
I have not encountered this problem because...

1. For a long time I didn't know that it is possible to change the font in the game.

2. And when I found out about it, I didn't know how to do it.

3. Later I knew, but today I forgot again how and where.

People familiar with how to change the font will likely benefit from this change. However, the vast majority of players don't know about this possibility.

This proposal is a completely different level of complexity of the work and it is probably not very revealing, but...
The option to select the type and size of fonts available in the settings window would be useful in the game. The current variant x1 / x2 / x4 rarely gives satisfactory results.

Please keep comments relevant to the topic at hand. This Pull Request is, as you already conclude, to fix a specific problem. It is not about fixing [everything else]. If you feel what you describe is a bug, create an issue please, so it can be processed properly. Tnx!

@TrueBrain TrueBrain merged commit c6fd6cf into OpenTTD:master Jan 13, 2021
@TrueBrain TrueBrain deleted the font-weirdness branch January 13, 2021 13:27
Copy link
Contributor

@glx22 glx22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it can give better debug output than currently (as seen in #7615) let's go

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

Successfully merging this pull request may close these issues.

"medium_font" setting is not applied properly in korean
4 participants