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

[Bug]: Without hardware acceleration, switching from Arabic to English results in black palette. #10081

Open
PeterN opened this issue Oct 15, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@PeterN
Copy link
Member

PeterN commented Oct 15, 2022

Version of OpenTTD

master-g3e86f337a8

Expected result

Palette should not be affected by switching language.

Actual result

image

Palette is reset to black, only animated pixels are updated.

This only occurs when default sprite font used (but truetype antialiasing is enabled) and hardware acceleration is disabled, so the win32 video driver is in use rather than win32-opengl.

When switching to Arabic, the game automatically switches to using a truetype font. When switching back to English, the game automatically switches back to using the sprite font. Because antialiasing is enabled, this also causes the blitter to switch from 8bpp to 32bpp and then back to 8bpp.

Presumably a palette initialization is missing in this case.

Steps to reproduce

  1. In the config, enable truetype antialiasing, but don't enable a truetype font.
  2. Disable hardware acceleration (restart if necessary.)
  3. Open game settings and set to Arabic.
  4. Reset back to English (assumptions!) or any language that is supported by the sprite font.
@glx22
Copy link
Contributor

glx22 commented Oct 16, 2022

Confirmed, but support8bpp needs to not be set to no.
Needs to be tested on other OS too.

Switching from French to Arabic

[2022-10-16 03:02:48] dbg: [fontcache] Font is missing glyphs to display char 0x648 in medium font size
[2022-10-16 03:02:53] dbg: [driver] Switching blitter from '8bpp-optimized' to '32bpp-sse2-anim'...
[2022-10-16 03:02:53] dbg: [driver] Successfully loaded blitter '32bpp-sse2-anim'
[2022-10-16 03:02:53] dbg: [driver] Successfully switched to 32bpp-sse2-anim.

Switching back to French

[2022-10-16 03:03:18] dbg: [driver] Switching blitter from '32bpp-sse2-anim' to '8bpp-optimized'...
[2022-10-16 03:03:18] dbg: [driver] Successfully loaded blitter '8bpp-optimized'
[2022-10-16 03:03:18] dbg: [driver] Successfully switched to 8bpp-optimized.

and everything is black except animated pixels.

@2TallTyler 2TallTyler added the bug Something isn't working label Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants