| Summary: | X11 MessageBox doesn't work (can't load font) with UTF-8 system locale | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Rémi Verschelde <rverschelde> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 2.0.5 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: | Proposed patch based on comment 2 | ||
|
Description
Rémi Verschelde
2017-01-27 19:45:54 UTC
Does it work to just have this? "-*-*-*-*-*--*-120-*-*-*-*-*-*" What about this? "-*-*-*-*-*--0-120-*-*-*-*-*-*" This is useful info about those font descriptions: https://wiki.archlinux.org/index.php/X_Logical_Font_Description Thanks for the resource, as always the Arch wiki is quite helpful :) The two suggestions from comment 1 don't work for me. This seems to be the minimal working font description on my system: (1) "-*-*-medium-*-*--*-120-*-*-*-*-*-*" It however defaults to an italic font, and this the Arch wiki says for slant "Usually this needs to be specified.", I guess this would be better: (2) "-*-*-medium-r-*--*-120-*-*-*-*-*-*" For the next argument setwidth_name, the wiki mentions that "A value should be set, not wildcarded, when there are two or more possible values.", so maybe this would be better: (3) "-*-*-medium-r-normal--*-120-*-*-*-*-*-*" For this setup, xfontsel says that 374 names match on my system, so I suppose it's still generic enough to work on most systems. To compare with the Latin1 font used currently: g_MessageBoxFontLatin1[] = "-*-*-medium-r-normal--0-120-*-*-p-0-iso8859-1"; So unless there's a strong reason not to specify the weight_name, slant and setwidth_name, I guess the above proposal (3) would solve the bug for me (and hopefully not introduce regressions on other systems). For the reference, here are the x11 font packs I have installed currently: $ rpm -qa | grep x11-font | sort x11-font-adobe-100dpi-1.0.3-6.mga6 x11-font-adobe-75dpi-1.0.3-6.mga6 x11-font-alias-1.0.3-7.mga6 x11-font-bh-100dpi-1.0.3-6.mga6 x11-font-bh-75dpi-1.0.3-6.mga6 x11-font-bh-lucidatypewriter-100dpi-1.0.3-6.mga6 x11-font-bh-lucidatypewriter-75dpi-1.0.3-6.mga6 x11-font-bitstream-100dpi-1.0.3-6.mga6 x11-font-bitstream-75dpi-1.0.3-6.mga6 x11-font-bitstream-type1-1.0.3-6.mga6 x11-font-cursor-misc-1.0.3-6.mga6 x11-font-daewoo-misc-1.0.3-6.mga6 x11-font-encodings-1.0.4-6.mga6 x11-font-isas-misc-1.0.3-6.mga6 x11-font-jis-misc-1.0.3-6.mga6 x11-font-misc-misc-1.1.2-6.mga6 x11-font-type1-1.0.0-13.mga6 x11-font-xfree86-type1-1.0.4-6.mga6 Out of those: http://madb.mageia.org/package/list/t_search/x11-font/release/cauldron/application/0 Created attachment 2689 [details] Proposed patch based on comment 2 Looks good, thanks! https://hg.libsdl.org/SDL/rev/f8343b61abf7 |