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] Using Pixel-Perfect default font breaks Russian letters #1961

Open
1 task done
Lemon4ksan opened this issue Nov 19, 2024 · 2 comments
Open
1 task done

[Bug] Using Pixel-Perfect default font breaks Russian letters #1961

Lemon4ksan opened this issue Nov 19, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Lemon4ksan
Copy link

Lemon4ksan commented Nov 19, 2024

Operating System

Windows

What's the issue you encountered?

When using Pixel-Perfect default font, Russian characters are much larger than other ones.
image

How can the issue be reproduced?

I've discovered this issue when I tried to translate the app, but it can also be reproduced by typing any Russian characters in search field or by opening files with Russian names on stable version 1.35.4. Letters display correctly if "Pixel-Perfect default font" option in Fonts settings menu is disabled. This option is on by default, so it's surely unintended.
image

ImHex Version

1.36.0.WIP, 6d14b3f

ImHex Build Type

  • Nightly or built from sources

Installation type

Msys64 build

Additional context?

No response

@Lemon4ksan Lemon4ksan added the bug Something isn't working label Nov 19, 2024
@paxcut
Copy link
Contributor

paxcut commented Nov 23, 2024

When using Pixel-Perfect default font, Russian characters are much larger than other ones.

The default font (a pixel perfect font called Proggy Clean) only defines ASCII Latin letters. For the rest of the letters ImHex uses a different font called Unifont. What you are seeing is the well known fact that at the same font size both fonts appear different in size. The difference is not restricted to Russian (Cyrillic) letters only, but to every non-Latin letter. This cannot be fixed in the sense that font makers have complete control on the design of their products and the fonts cannot be scaled to have similar size without them becoming blurry.

This bug can be solved by disabling "Pixel-Perfect default font" option in Fonts settings menu. This option is on by default, so it's surely unintended.

When you disable the "Pixel-Perfect default font" option, you are switching the font ImHex uses from the default font to another mono-spaced font called Firacode which defines Latin and non-Latin letters, so there are no size differences between Latin and non-Latin letters. The Firacode font doesn't look as good as the default font for Latin letters so it is not a good choice as default font.

The underlying problem is un-fixable and unavoidable. ImHex is based on Dear ImGui which lacks features for font rendering that makes the text look ugly even if you use your favorite font, so the choices for default fonts are limited.

@Lemon4ksan
Copy link
Author

Lemon4ksan commented Nov 23, 2024

Thanks for the explanation. I think there should be at least a warning about it. It took me quite some time to figure out why it is like that.

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

2 participants