Japanese fonts in an XFT xmobar or dzen panel with dynamiclog

Greetings Team, I've been trying to figure out a solution for a long time now on how to get different character sets like japanese and korean to render for xmobar or dzen with XFT from the xmonad dynamiclog. If my font is something like liberation or dejavu (mono/sans/serif/etc) I'll get squares for any japanese character that should be rendered (or chinese or korean / etc). It will render the japanese font if I set my font to be an actual japanese font like takao, but I'd like to have my full range of fonts work so it will render korean and other characters. Anyone know a solution to this? normally with any gtk/qt app, it will obey my fontconfig settings, though dzen and xmobar do not. Thanks Daniel

Quoting Daniel Anderson
It will render the japanese font if I set my font to be an actual japanese font like takao, but I'd like to have my full range of fonts work so it will render korean and other characters.
Anyone know a solution to this? normally with any gtk/qt app, it will obey my fontconfig settings, though dzen and xmobar do not.
You will probably have to patch them to add fontconfig support. Alternately, consider using taffybar, which is gtk-based and therefore probably comes with fontconfig support for free. ~d

On 11/10/11 13:18, wagnerdm@seas.upenn.edu wrote:
Quoting Daniel Anderson
: It will render the japanese font if I set my font to be an actual japanese font like takao, but I'd like to have my full range of fonts work so it will render korean and other characters.
Anyone know a solution to this? normally with any gtk/qt app, it will obey my fontconfig settings, though dzen and xmobar do not.
You will probably have to patch them to add fontconfig support. Alternately, consider using taffybar, which is gtk-based and therefore probably comes with fontconfig support for free.
If I want to use taffybar on top of my Ubuntu 10.10 xmonad, what am I going to need to do/install? When I git clone the specified repo, I get sources but there are no instructions on how to build them. Michael

Quoting Michael Norrish
If I want to use taffybar on top of my Ubuntu 10.10 xmonad, what am I going to need to do/install?
Grab the gtk-dev libraries (a brief glance at packages.ubuntu.com suggests you'll need at least libgtk2.0-dev, libglib2.0-dev, and libcairo2-dev, dunno if you need any others) from your package manager, then in a terminal type cabal install gtk2hs-buildtools cabal install taffybar and you should be done. ~d

On 11/10/11 23:28, wagnerdm@seas.upenn.edu wrote:
Quoting Michael Norrish
:
If I want to use taffybar on top of my Ubuntu 10.10 xmonad, what am I going to need to do/install?
Grab the gtk-dev libraries (a brief glance at packages.ubuntu.com suggests you'll need at least libgtk2.0-dev, libglib2.0-dev, and libcairo2-dev, dunno if you need any others) from your package manager, then in a terminal type
cabal install gtk2hs-buildtools cabal install taffybar
I installed the apt package manager's cabal, and then found that cabal wanted to upgrade itself. Unfortunately, it didn't replace the one in /usr/bin/, but instead put itself in ~/.cabal/bin. If I then run that I get $ ~/.cabal/bin/cabal -V cabal-install version 0.10.2 using version 1.10.2.0 of the Cabal library I believe I have all of the gtk, glib and cairo dependencies. Then I try $ sudo ~/.cabal/bin/cabal install gtk2hs-buildtools Resolving dependencies... Configuring gtk2hs-buildtools-0.12.1... cabal: The program alex is required but it could not be found. cabal: Error: some packages failed to install: gtk2hs-buildtools-0.12.1 failed during the configure step. The exception was: ExitFailure 1 I see from my Ubuntu package manager that alex is a Haskell lex-alike. I try $ sudo ~/.cabal/bin/cabal install alex Resolving dependencies... Downloading QuickCheck-2.4.1.1... Configuring QuickCheck-2.4.1.1... Preprocessing library QuickCheck-2.4.1.1... Building QuickCheck-2.4.1.1... [ ... output elided ... ] Registering QuickCheck-2.4.1.1... Downloading alex-3.0.1... [1 of 1] Compiling Main ( /tmp/alex-3.0.19926/alex-3.0.1/Setup.lhs, /tmp/alex-3.0.19926/alex-3.0.1/dist/setup/Main.o ) /tmp/alex-3.0.19926/alex-3.0.1/Setup.lhs:6:51: Warning: In the use of `buildVerbose' (imported from Distribution.Simple.Setup): Deprecated: "Use buildVerbosity instead" /tmp/alex-3.0.19926/alex-3.0.1/Setup.lhs:7:51: Warning: In the use of `defaultUserHooks' (imported from Distribution.Simple): Deprecated: "Use simpleUserHooks or autoconfUserHooks, unless you need Cabal-1.2 compatibility in which case you must stick with defaultUserHooks" Linking /tmp/alex-3.0.19926/alex-3.0.1/dist/setup/setup ... Warning: defaultUserHooks in Setup script is deprecated. Configuring alex-3.0.1... Preprocessing executables for alex-3.0.1... Building alex-3.0.1... ghc: unrecognised flags: -rtsopts Usage: For basic information, try the `--help' option. cabal: Error: some packages failed to install: alex-3.0.1 failed during the building phase. The exception was: ExitFailure 1 I think I'm probably in package manager hell at this point, but I persevere and successfully do an sudo apt-get install alex. Then cabal install of the gtk2hs fails with happy reported as missing. I don't even bother with the cabal version of this, but get it successfully from apt. Then installing gtk2hs works. Trying to build taffybar does a whole lot of stuff, before eventually failing. Luckily I saw its message saying that I need to put ~/.cabal/bin into my PATH, so I do this. Then I realise I shouldn't be running with sudo at all because sudo-ed execution runs with a different PATH. So I chown -R a whole lot of stuff under ~/.cabal and ~/.ghc that was owned by root, and continue. Then I see Building xmonad-contrib-0.9.1... [ 1 of 180] Compiling XMonad.Util.Replace ( XMonad/Util/Replace.hs, dist/build/XMonad/Util/Replace.o ) XMonad/Util/Replace.hs:1:0: Warning: Module `Prelude' is deprecated: You are using the old package `base' version 3.x. Future GHC versions will not support base version 3.x. You should update your code to use the new base version 4.x. [ 2 of 180] Compiling XMonad.Util.CustomKeys ( XMonad/Util/CustomKeys.hs, dist/build/XMonad/Util/CustomKeys.o ) XMonad/Util/CustomKeys.hs:80:23: Not in scope: data constructor `Reader' cabal: Error: some packages failed to install: gtk-traymanager-0.1.2 failed during the configure step. The exception was: ExitFailure 1 taffybar-0.1.3 depends on xmonad-contrib-0.9.1 which failed to install. xmonad-contrib-0.9.1 failed during the building phase. The exception was: ExitFailure 1 At this point I give up. What do I need to do to create a proper Haskell dev environment?
and you should be done.
Not quite :-) Michael

Phew, sorry that was such a mess. And good debugging -- you got
through some quite tricky stuff there and it looks like you mostly did
things right!
Quoting Michael Norrish
Building xmonad-contrib-0.9.1... [ 1 of 180] Compiling XMonad.Util.Replace ( XMonad/Util/Replace.hs, dist/build/XMonad/Util/Replace.o )
XMonad/Util/Replace.hs:1:0: Warning: Module `Prelude' is deprecated: You are using the old package `base' version 3.x. Future GHC versions will not support base version 3.x. You should update your code to use the new base version 4.x. [ 2 of 180] Compiling XMonad.Util.CustomKeys ( XMonad/Util/CustomKeys.hs, dist/build/XMonad/Util/CustomKeys.o )
XMonad/Util/CustomKeys.hs:80:23: Not in scope: data constructor `Reader' cabal: Error: some packages failed to install: gtk-traymanager-0.1.2 failed during the configure step. The exception was: ExitFailure 1 taffybar-0.1.3 depends on xmonad-contrib-0.9.1 which failed to install. xmonad-contrib-0.9.1 failed during the building phase. The exception was: ExitFailure 1
Okay, getting close... it looks like something strange is going on with your mtl. Can you post the output of "ghc-pkg list | grep mtl"? (Note that this is different than "ghc-pkg list mtl" -- there are a few different packages all with mtl in their name.) Also, please tell us how you installed xmonad -- did you build it yourself from one of the releases on the website, or did you install it from your package manager? (If the latter, you might consider installing xmonad-contrib from your package manager as well.) You might want to hop on #xmonad, too, for a more interactive debugging experience. ~d

On 12/10/11 13:41, wagnerdm@seas.upenn.edu wrote:
Okay, getting close... it looks like something strange is going on with your mtl. Can you post the output of "ghc-pkg list | grep mtl"? (Note that this is different than "ghc-pkg list mtl" -- there are a few different packages all with mtl in their name.)
$ ghc-pkg list | grep mtl mtl-1.1.0.2 mtl-2.0.1.0 Incidentally, $ ghc-pkg list mtl /var/lib/ghc-6.12.1/package.conf.d mtl-1.1.0.2 /home/michaeln/.ghc/i386-linux-6.12.1/package.conf.d mtl-2.0.1.0 I guess this is bad. Presumably mixing the two worlds is causing me pain. I'm happy to dump the apt stuff if that's the right way forward.
Also, please tell us how you installed xmonad -- did you build it yourself from one of the releases on the website, or did you install it from your package manager? (If the latter, you might consider installing xmonad-contrib from your package manager as well.)
It's from the Ubuntu apt. I also installed xmonad-contrib from the same place. Well, strictly the package installed is libghc6-xmonad-contrib-dev
You might want to hop on #xmonad, too, for a more interactive debugging experience.
When I'm next able to give it some sustained time, I'll try bugging anyone there that happens to be awake; thanks. Michael
participants (3)
-
Daniel Anderson
-
Michael Norrish
-
wagnerdm@seas.upenn.edu