Skip to content
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

Layout broken on Arch Linux by missing Xorg misc font #348

Closed
1 of 2 tasks
sergeykish opened this issue May 31, 2020 · 0 comments · Fixed by #349
Closed
1 of 2 tasks

Layout broken on Arch Linux by missing Xorg misc font #348

sergeykish opened this issue May 31, 2020 · 0 comments · Fixed by #349

Comments

@sergeykish
Copy link
Contributor

Problem Description

Initial investigation in xmonad/xmonad#225

I follow https://hackage.haskell.org/package/xmonad-contrib-0.13/docs/XMonad-Layout-Tabbed.html

ER: it shows tabs
AR: one fullscreen window

Fix - set fontName (even on non existent).

Toggling between with and without fontName:

Mod-q (reload) does not affect
Shift-Mod-q (quit), startx affects

$ startx 2> errors
user error (createFontSet)
user error (createFontSet)
user error (createFontSet)
user error (createFontSet)
user error (Error in function getWindowAttributes)
user error (createFontSet)
user error (Error in function getWindowAttributes)
user error (createFontSet)
user error (Error in function getWindowAttributes)

Caused by default fontName

, fontName = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"

Arch Linux does not recommend installing xorg-fonts-misc maybe caused by

Note: pango 1.44 dropped support for FreeType in favor of HarfBuzz thus losing support for traditional BDF/PCF bitmap fonts

https://wiki.archlinux.org/index.php/Fonts#Bitmap

Configuration File

import XMonad
import XMonad.Layout.Tabbed

myTabConfig = def { inactiveBorderColor = "#FF0000"
                  -- , fontName = "xft:foo"
                  , activeTextColor = "#00FF00"}
myLayout = tabbed shrinkText myTabConfig

main = do
    xmonad $ def
        { layoutHook  = myLayout }

Not limited to Tabs Layout

Same problem with https://hackage.haskell.org/package/xmonad-contrib-0.16/docs/XMonad-Layout-DwmStyle.html

ER: DWM style - like Tall with name in top right corner
AR: fullscreen window

import XMonad
import XMonad.Layout.DwmStyle

myDWConfig = def { inactiveBorderColor = "red"
                 --, fontName = "xft:foo"
                 , inactiveTextColor   = "red"}

myL = dwmStyle shrinkText myDWConfig (layoutHook def)
main = xmonad def { layoutHook = myL }

Checklist

I've installed git versions, reproduced

xmonad $ git show
commit 40466b2be266e50e941f2fcc53b7526f1cfc71be (HEAD -> master)
xmonad-contrib $ git show
commit 6c60740f7e6bffd44072784fdf855cd42ccc7f84 (HEAD -> master)

Proposed fix

--- a/XMonad/Layout/Decoration.hs
+++ b/XMonad/Layout/Decoration.hs
@@ -103,7 +103,7 @@ instance Default Theme where
           , activeTextColor     = "#FFFFFF"
           , inactiveTextColor   = "#BFBFBF"
           , urgentTextColor     = "#FF0000"
-          , fontName            = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
+          , fontName            = "-*-*-*-*-*-*-*-*-*-*-*-*-*-*"
           , decoWidth           = 200
           , decoHeight          = 20
           , windowTitleAddons   = []

It is really messy issue. Xmonad does not crash, Mod-q does not affect, startx stderr is not visible (X displayed on same TTY, trimmed on quit) unless explicitly checked, no errors in ~n.xmonad/xmonad.errors, no errors in ~/.local/share/xorg/Xorg.*, xfontsel requires X restart, -fuse_xft does not affect, fc-match matches another foundry and family.

I'll prepare Pull Request and will hope I'm last who investigated this

sergeykish added a commit to sergeykish/xmonad-contrib that referenced this issue May 31, 2020
Layout broken if font is not found with `user error (createFontSet)`

Pango 1.44 dropped support for FreeType in favor of HarfBuzz thus losing support for traditional BDF/PCF bitmap fonts. There would be no `xorg-fonts-misc` on future installations.

Fixes xmonad#348
sergeykish added a commit to sergeykish/xmonad-contrib that referenced this issue May 31, 2020
Layout broken if font is not found with `user error (createFontSet)`

Pango 1.44 dropped support for FreeType in favor of HarfBuzz thus losing support for traditional BDF/PCF bitmap fonts. There would be no `xorg-fonts-misc` on future installations.

Fixes xmonad#348
sergeykish added a commit to sergeykish/xmonad-contrib that referenced this issue May 31, 2020
Layout broken if font is not found with `user error (createFontSet)`

Pango 1.44 dropped support for FreeType in favor of HarfBuzz
thus losing support for traditional BDF/PCF bitmap fonts.
There would be no `xorg-fonts-misc` on future installations.

Fixes xmonad#348
slotThe pushed a commit to sergeykish/xmonad-contrib that referenced this issue Mar 19, 2021
Layout broken if font is not found with `user error (createFontSet)`

Pango 1.44 dropped support for FreeType in favor of HarfBuzz
thus losing support for traditional BDF/PCF bitmap fonts.
There would be no `xorg-fonts-misc` on future installations.

Fixes xmonad#348
slotThe pushed a commit to sergeykish/xmonad-contrib that referenced this issue Mar 24, 2021
Layout broken if font is not found with `user error (createFontSet)`

Pango 1.44 dropped support for FreeType in favor of HarfBuzz
thus losing support for traditional BDF/PCF bitmap fonts.
There would be no `xorg-fonts-misc` on future installations.

Fixes xmonad#348
slotThe pushed a commit to sergeykish/xmonad-contrib that referenced this issue Mar 24, 2021
The silent error `user error (createFontSet)` would break certain
modules (like the prompt) by simply not showing anything.

Pango 1.44 dropped support for FreeType in favor of HarfBuzz, losing
support for traditional BDF/PCF bitmap fonts.  Hence, some distributions
don't ship `xorg-fonts-misc` anymore.

Fixes xmonad#348
slotThe pushed a commit to sergeykish/xmonad-contrib that referenced this issue Mar 24, 2021
The silent error `user error (createFontSet)` would break certain
modules (like the prompt) by simply not showing anything.

Pango 1.44 dropped support for FreeType in favor of HarfBuzz, losing
support for traditional BDF/PCF bitmap fonts.  Hence, some distributions
don't ship `xorg-fonts-misc` anymore.

Fixes xmonad#348
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

Successfully merging a pull request may close this issue.

1 participant