joewing / jwm

Joe's Window Manager
http://joewing.net/projects/jwm
MIT License
526 stars 84 forks source link

Wrong display terminus font #377

Open Gavcheg opened 7 years ago

Gavcheg commented 7 years ago

Hello! My problem is If i trying use terminus font (http://terminus-font.sourceforge.net/) in wm interface, i see wrong encoding cyrillic words. For example in openbox its fine. Maby i missing something? 2017-04-22-211905_1680x1050_scrot

rdnvndr commented 7 years ago

You need to replace "xos4 Terminus-12" by "Terminus-12". It 's no the problems JWM. screenshot

Gavcheg commented 7 years ago

But if i set "Terminus-12" not terminus font used! Correct name is "xos4 Terminus".

rdnvndr commented 7 years ago

Add the files to /etc/fonts/conf.d/ 33-TerminusPCFFont.conf:

<?xml version="1.0"?>
 <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
 <fontconfig>
     <alias>
         <family>Terminus</family>
         <prefer><family>xos4 Terminus</family></prefer>
         <default><family>fixed</family></default>
     </alias>
 </fontconfig>

75-yes-terminus.conf:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Accept terminus font -->
 <selectfont>
  <acceptfont>
   <pattern>
     <patelt name="family"><string>Terminus</string></patelt>
   </pattern>
  </acceptfont>
 </selectfont>
</fontconfig>
Gavcheg commented 7 years ago

Did it. But no luck. Nothing difference. Now i compile jwm without xft and see small changes. No idea where i wrong. 2017-04-23-213602_1680x1050_scrot

rdnvndr commented 7 years ago

Run: "xterm -fa Terminus-12" Is the font changed ?

Gavcheg commented 7 years ago

Yes, this is terminus. On my screenshots we see terminus too.

rdnvndr commented 7 years ago

Run the command "locale" in xterm and show the output

Gavcheg commented 7 years ago

LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL=

rdnvndr commented 7 years ago

Change the locale to "ru_RU.UTF-8" and run the JWM. The script for verify:

export LANG=ru_RU.UTF-8; jwm
Gavcheg commented 7 years ago

So.. with ru_RU locale jwm display terminus font right. But it not proper solution for me. Also if i built jwm without xft LANG to ru_RU not show any difference as i comment earlier https://github.com/joewing/jwm/issues/377#issuecomment-296475236 Interesting.

rdnvndr commented 7 years ago

XTerm also does not show the correct font. I think the problem in X libraries. But I can be wrong.

technosaurus commented 7 years ago

Just a theory - haven't checked, but is it an issue with all fonts with spaces in the name?

rdnvndr commented 7 years ago

The problem is not the font name. The problem is the localization.

joewing commented 7 years ago

I would guess this is due to JWM not supporting WM_LOCALE_NAME (issue #267).