fortheusers / hb-appstore

Homebrew App Store - GUI for downloading/managing homebrew apps
https://hb-app.store
GNU General Public License v3.0
1.02k stars 60 forks source link

Garbled non-ASCII characters #115

Closed GewoonLeonYT closed 3 months ago

GewoonLeonYT commented 5 months ago

Describe the bug Non-ASCII characters are garbled on the AppDetails screen, but work fine elsewhere

Platform: Affects all platforms

To Reproduce Using a custom repo with the following repo.json:

{
    "packages": [
        {
            "name": "test",
            "title": "Testin’",
            "author": "test",
            "version": "1.0.0",
            "details": "Testin’"
        }
    ]
}

And going the app details page, the apostrophe "’" (U+2019) becomes garbled; this also happens to other non-ASCII characters. 2024-01-30_01-56 On other screens and the title at the top of the app details it's fine. 2024-01-30_01-44

vgmoose commented 3 months ago

Thank you for the report and example repo to reproduce! This appears to be fixed now with the new localization support (which also supports more UTF8 characters) in: https://github.com/fortheusers/hb-appstore/commit/b22b24968ac76af8fc01b28b29d3554ca8d1bff7. The very specific change that fixes this page is the use of TTF_RenderUTF8_Blended_Wrapped instead of TTF_RenderText_Blended_Wrapped in Chesto's TextElement.

Image of App Details after those changes:

Screenshot 2024-04-14 at 5 53 37 PM