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: don't complain when the sprite font is missing glyphs. #9692

Merged
merged 1 commit into from
Nov 13, 2021

Conversation

frosch123
Copy link
Member

Motivation / Problem

On start OpenTTD checks whether the loaded font supports all glyphs used by the current language pack.

If the font is lacking, it tries to find a suitable font itself, and shows an error message.

The error message is useful, if

  • the user manually configured a bad font, and OpenTTD ignores this to pick a better one itself
  • there is no suitable font at all.

However, the error is also shown if no font is configured (default), which is not useful at all.
All new players with non-latin-alphabet languages, see this message on start:
https://steamcommunity.com/sharedfiles/filedetails/?id=2443789429

Description

Font configured Configured font is useable Fallback font found OpenTTD 12.1 This PR
no yes N/A ok ok
no no yes error ok
no no no error error
yes yes N/A ok ok
yes no yes error error
yes no no error error

Limitations

The "font configured" is decided by the "medium"/"normal" font only.
It's assumed if the user knows how to configure that one, they also know about the other font sizes.

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 touches english.txt or translations? Check the guidelines
  • 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')

@frosch123 frosch123 added the backport requested This PR should be backport to current release (RC / stable) label Nov 13, 2021
@frosch123 frosch123 force-pushed the dont_complain_about_sprite_font branch from c226e06 to 90b7ac2 Compare November 13, 2021 17:33
@frosch123 frosch123 force-pushed the dont_complain_about_sprite_font branch from 90b7ac2 to b83edbd Compare November 13, 2021 18:08
@frosch123 frosch123 merged commit 5f6303f into OpenTTD:master Nov 13, 2021
TrueBrain pushed a commit to TrueBrain/OpenTTD that referenced this pull request Jan 3, 2022
TrueBrain pushed a commit that referenced this pull request Jan 5, 2022
@TrueBrain TrueBrain added backported This PR is backported to a current release (RC / stable) and removed backport requested This PR should be backport to current release (RC / stable) labels Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported This PR is backported to a current release (RC / stable)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants