-
Notifications
You must be signed in to change notification settings - Fork 15
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
CJK TW text is missing #149
Comments
What exactly does TW mean? You talk about zh_TW locale? I cannot read ZH but I can tell you what seems to work for me, maybe this helps. Step by step: a) make sure that you have general system support enabled ( b) make sure to have some CJK-offering fonts installed. Example: If nothing listed, install some, like: c) locate your config folder. That is probably ~/.icewm or ~/.config/icewm . d) in the config folder, create the e) get existing settings and adapt them to CJK specific fonts. Also get the fontconfig name of the font that you want:
-> replace the regular font name with the font of your choice, then put this into the mentioned prefoverride file. In my example (Noto fonts, see below), this looks like:
|
Actually I could imagine creating a special icewm-cjk package in Debian, which would make such settings default. But it would be even better if icewm had a special feature, some kind of locale-specific trigger which would load a different subset of default settings. @gijsbers your opinion? @louies0623 Can you recommend which fonts could be selected by default, i.e. which are typically present and would work best on a default Debian installation for zh_TW? |
Okay. Then the suggested config change should work when Noto fonts are present. In the meantime I checked how we can automate the font selection. Qt and GTK have smart ways to match the font list against the locale (see screenshot of yours) but icewm does not. And using the Xft API alone seems not to respect the locale. But it seems like one can enforce the font filtering for the locale by specifying it explicitly, and NOT specifying a custom font (which is currently the hardcoded setting). Like:
Or if you need to find a matching font explicitly, try:
And change "Sans" to whatever you like. @gijsbers We probably should automate this handling. I.e. remove the hardcoded font name, and if locale is not plain C and also when the font spec is not having a lang= string inside then add a such lang string (as shown above, with trivial character mapping from LC_CTYPE or LC_LANG); and only when no font can be resolved like that, only then fall back to the font spec without lang=. We could also have a fall-back scheme on top, for example have a way to specify a list of Xft setting (semicolon separated?) so that it would be possible to try both ways, i.e. first load "DejaVu Sans:..." and if that does not work then try with "Sans:...". I could actually try to implement this soon - any objections? |
I hope your team can fix this, so I have no objections. |
Yes, we could improve the current situation, but what is the source of the ":lang=%s" parameter? Where in the source do we have this? Why do you want to remove the hardcoded font name? |
@Code7R You mention LC_LANG, but this seems undefined and a typo? @louies0623 Can you give me your values of LANG and LC_ALL? Like: |
This is not as smart as libpango and similar but should instruct Xft sufficiently to select a Sans compatible font which actually brings the required codeset. Closes ice-wm/icewm#149
This is not as smart as libpango and similar but should instruct Xft sufficiently to select a Sans compatible font which actually brings the required codeset. Closes ice-wm/icewm#149
@gijsbers Please have a look at bbidulock/icewm#762 , this should do the job. IMHO the setlocale call for LC_CTYPE should return you either the value of LC_CTYPE (if set) or fall back to the value of LANG. I.e. the normal behavior of locale() mechanism. So we get the lang/country part and amend it to get the Xft syntax. |
Thanks! I wrote this patch, which is similar, but failed to notice an actual improvement. |
Debian 12
use install apt-get icewm
The text was updated successfully, but these errors were encountered: