Skip to content

XMonad would crash if XMonad.Layout.Tabbed.Theme.fontName was a series of Xft font names. #209

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

Closed
crocket opened this issue Aug 29, 2017 · 7 comments

Comments

@crocket
Copy link

crocket commented Aug 29, 2017

Problem Description

Before upgrading packages on Gentoo Linux, the tabbed layout just displayed rectangles instead of chinese characters when I played japanese youtube videos on a web browser.

After upgrade, if XMonad.Layout.Tabbed.Theme.fontName was set to a series of Xft font names, XMonad would just crash. This issue is also reproducible on Manjaro Linux.

For example, if XMonad.Layout.Tabbed.tabbed or XMonad.Layout.Tabbed.addTabs was passed XMonad.Layout.Tabbed.Theme with its fontName set to xft:LiberationMono:size=13,NanumGothicCoding:size=13,ipamincho:size=13,ipagothic:size=13,uming:size=13, then XMonad crashes.

This issue is related to #173

Configuration File

import XMonad
import XMonad.Layout.Tabbed (tabbed, Theme(fontName))
import XMonad.Layout.SimpleDecoration (shrinkText)

main :: IO ()
main = do
  xmonad $ def
    { layoutHook =
        Tall 1 (3/100) (53/100) |||
        tabbed shrinkText def { fontName = theFont }
    }

theFont :: String
theFont = "xft:LiberationMono:size=13,NanumGothicCoding:size=13,ipamincho:size=13,ipagothic:size=13,uming:size=13"

If I press M-Space to switch the layout to the tabbed layout, XMonad explodes.

theFont = "xft:Monospace-13" and theFont = "xft:LiberationMono-13,NanumGothicCoding-13,ipamincho-13,ipagothic-13,uming-13" don't crash XMonad.

According to my tests, if fontName is a list of Xft fonts, only the first font in the list is used.

@geekosaur
Copy link
Contributor

geekosaur commented Aug 29, 2017 via email

@crocket
Copy link
Author

crocket commented Aug 29, 2017

On Gentoo Linux, there is /var/log/messages instead of journald. I found nothing in /var/log/messages and /var/log/Xorg.*.log.

With profiling build, I got the following errors, but those errors do not seem to reveal the cause of the issue.

startx.txt
xsession-errors.txt

@geekosaur
Copy link
Contributor

Both of those are crashes in getWindowAttributes, which should not happen unless someone overrode the version requirement for the Haskell X11 bindings.

Arch already did that once, maybe Gentoo decided to do the same thing. :/ That will cause crashes.

@crocket
Copy link
Author

crocket commented Aug 30, 2017

Those errors were gathered from a profiling build of stack.
~/.xmonad/build builds ~/.xmonad/xmonad-x86_64-linux via stack.yaml.
Those exceptions do not crash XMonad.
I built gentoo packages with profile flag, but xmonad --recompile didn't produce a profiling executable for the sample config.

Can you reproduce the issue with my sample config?

@x-ji
Copy link

x-ji commented Oct 8, 2018

I'm also encountering this error on Arch Linux (Manjaro). Only specifying one xft font works fine.

@Vonfry
Copy link

Vonfry commented Aug 7, 2020

How about add pango suuport? Its haskell binding may better than xft.

@slotThe
Copy link
Member

slotThe commented Mar 4, 2022

Font fallback was implemented in #646, so I'm closing this

@slotThe slotThe closed this as completed Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants