You are not logged in.

#1 2018-02-25 18:57:16

Doron.Behar
Member
Registered: 2016-12-21
Posts: 36

xlockmore can't find fonts to display messages

I'm having trouble with the program `xlock` (provided by the package `xlockmore`).

Basically the problem is that when I run it just like that with no special options, I get this errors/warnings:

Could not create FontSet -*-fixed-medium-r-*-*-14-*-*-*-*-*-*,-*-*-medium-r-normal--14-*
xlock: can not find font: *8x16*, using fixed...
xlock: can't find font: -*-fixed-medium-r-*-*-14-*-*-*-*-*-*, using fixed...

I tried to explicitly specify a font using `-font` but I get similar errors/warnings as well:

$ xlock -font xft:FreeMono
Could not create FontSet -*-fixed-medium-r-*-*-14-*-*-*-*-*-*,-*-*-medium-r-normal--14-*
xlock: can not find font: xft:FreeMono, using fixed...
xlock: can't find font: -*-fixed-medium-r-*-*-14-*-*-*-*-*-*, using fixed...

I tried to check if `xfontsel` sees this font which I'm sure is installed, so I ran this command and got this output:

$ xfontsel -print -fn xft:FreeMono
Warning: Cannot convert string "xft:FreeMono" to type FontStruct
Warning: Unable to load any usable ISO8859 font
Warning: Unable to load any usable ISO8859 font
Warning: Missing charsets in String to FontSet conversion
Error: Aborting: no font found

I'm positive the font `FreeMono` is installed on my machine because I use in `urxvt`. I also tried using `FreeMono` without `xft:` and I got the same responses.

BTW: This problem with `xlock` started to appear after I had it working for a while (without me having to specify `-font`) so I guess a certain software update made this.

I would be glad to get some help here, thanks.

Offline

#2 2018-02-25 21:10:46

seth
Member
Registered: 2012-09-03
Posts: 51,319

Re: xlockmore can't find fonts to display messages

locale
locale -a
localectl
LANG=C LC_ALL=C xlock

Offline

#3 2018-02-26 15:19:52

Doron.Behar
Member
Registered: 2016-12-21
Posts: 36

Re: xlockmore can't find fonts to display messages

Hmm, that worked, who do you explain this? I still get error/warning messages:

$ LC_ALL=C xlock -font FreeMono
Could not create FontSet -*-helvetica-medium-r-*-*-24-*-*-*-*-*-*,-*-*-medium-r-normal--24-*
Could not create FontSet -*-fixed-medium-r-*-*-14-*-*-*-*-*-*,-*-*-medium-r-normal--14-*
xlock: can not find font: FreeMono, using fixed...
xlock: can't find font: -*-fixed-medium-r-*-*-14-*-*-*-*-*-*, using fixed...

And I can't make the font look different but at least I don't see empty squares of unrecognized characters.

The same goes when I specify `-font xft:FreeMono`.

Last edited by Doron.Behar (2018-02-26 15:20:39)

Offline

#4 2018-02-26 15:33:14

seth
Member
Registered: 2012-09-03
Posts: 51,319

Re: xlockmore can't find fonts to display messages

The original error message is kinda typical for (bad) UTF-8 encodings, so this was just a hunch.
Let's see:

locale
locale -a
localectl

I don't know how xlock resolves fonts - or the FreeMono font, sorry.

Offline

#5 2018-02-26 16:01:41

Doron.Behar
Member
Registered: 2016-12-21
Posts: 36

Re: xlockmore can't find fonts to display messages

$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=en_US.UTF-8
LC_TIME=en_ZA.UTF-8
LC_COLLATE=he_IL.UTF-8
LC_MONETARY=en_DK.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_PAPER=he_IL.UTF-8
LC_NAME=he_IL.UTF-8
LC_ADDRESS=he_IL.UTF-8
LC_TELEPHONE=he_IL.UTF-8
LC_MEASUREMENT=he_IL.UTF-8
LC_IDENTIFICATION=he_IL.UTF-8
LC_ALL=
$ locale -a
C
en_DK.utf8
en_US.utf8
en_ZA.utf8
he_IL.utf8
POSIX
$ localectl
   System Locale: LANG=en_US.UTF-8
                  LC_TIME=en_ZA.UTF-8
                  LC_COLLATE=he_IL.UTF-8
                  LC_MONETARY=en_DK.UTF-8
                  LC_PAPER=he_IL.UTF-8
                  LC_NAME=he_IL.UTF-8
                  LC_ADDRESS=he_IL.UTF-8
                  LC_TELEPHONE=he_IL.UTF-8
                  LC_MEASUREMENT=he_IL.UTF-8
                  LC_IDENTIFICATION=he_IL.UTF-8
       VC Keymap: n/a
VC Toggle Keymap: Alt+Shift
      X11 Layout: n/a

Offline

#6 2018-02-26 16:07:33

seth
Member
Registered: 2012-09-03
Posts: 51,319

Re: xlockmore can't find fonts to display messages

Let's do away with the hebrew (though I think xlock would interpret LANG)

LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 xlock

(Sidenote: you usually want LC_COLLATE to be "C", not UTF-8, because that leads to funky ordering, but I'm not sure whether that's the case if you predominantly deal with hebrew glyphs in filenames anyway)

Offline

#7 2018-02-26 16:16:08

Doron.Behar
Member
Registered: 2016-12-21
Posts: 36

Re: xlockmore can't find fonts to display messages

The command you wrote gives me the same unrecognized glyphs as before and the same errors/warnings.

Offline

#8 2018-02-26 23:05:58

seth
Member
Registered: 2012-09-03
Posts: 51,319

Re: xlockmore can't find fonts to display messages

Do you have any of these packages installed https://www.archlinux.org/packages/?rep … xorg-fonts ?

Offline

#9 2018-02-27 15:20:58

Doron.Behar
Member
Registered: 2016-12-21
Posts: 36

Re: xlockmore can't find fonts to display messages

$ pacman -Qsq xorg-fonts
xorg-font-util
xorg-fonts-alias
xorg-fonts-encodings

Offline

#10 2018-02-27 15:23:36

seth
Member
Registered: 2012-09-03
Posts: 51,319

Re: xlockmore can't find fonts to display messages

Try installing xorg-fonts-100dpi & xorg-fonts-75dpi (or check your DPI and pick the best match)

Offline

#11 2018-02-27 15:39:32

Doron.Behar
Member
Registered: 2016-12-21
Posts: 36

Re: xlockmore can't find fonts to display messages

Hmm, that's weird, I still get the same errors/warnings as in the beginning but I can see the glyphs just fine. I guess that's good enough for me but it could be nice to fix this as well..

Offline

#12 2018-02-27 17:07:01

seth
Member
Registered: 2012-09-03
Posts: 51,319

Re: xlockmore can't find fonts to display messages

What errors *precisely* and what does your ~/.Xresources look like?

Offline

#13 2018-02-27 17:40:24

Doron.Behar
Member
Registered: 2016-12-21
Posts: 36

Re: xlockmore can't find fonts to display messages

Error messages as before:

$ xlock
Could not create FontSet -*-fixed-medium-r-*-*-14-*-*-*-*-*-*,-*-*-medium-r-normal--14-*
xlock: can not find font: *8x16*, using fixed...
xlock: can't find font: -*-fixed-medium-r-*-*-14-*-*-*-*-*-*, using fixed...

My full `.Xresources` can be found here: https://github.com/doronbehar/dotfiles/ … Xresources
Here are the bits related to fonts:

$ grep -i font ~/.Xresource
!! {{{ Fonts
xterm*reportFonts:true
xterm*renderFont:true
xterm*faceName:DroidSansMono Nerd Font
xterm*utf8Fonts:true
!	Shift~Ctrl <KeyPress> KP_Add	:larger-vt-font() \n\
!	Shift Ctrl <KeyPress> KP_Add	:smaller-vt-font() \n\
!	Shift <KeyPress> KP_Subtract	:smaller-vt-font() \n\
!	!Ctrl <Btn3Down>				:popup-menu(fontMenu) \n\
!	!Lock Ctrl <Btn3Down>			:popup-menu(fontMenu) \n\
!	!Lock Ctrl @Num_Lock <Btn3Down>	:popup-menu(fontMenu) \n\
!	! @Num_Lock Ctrl <Btn3Down>		:popup-menu(fontMenu) \n\
!! {{{ Fonts
URxvt*font:\
	xft:DroidSansMonoForPowerline Nerd Font:size=10,\
	xft:DejaVuSansMono Nerd Font:size=9,\
	xft:Font Awesome 5 Free:size=9,\
	xft:Font Awesome 5 Free:size=8,\
	xft:Font Awesome 5 Free:size=7
URxvt.perl-ext:url-select,keyboard-select,font-size
URxvt.keysym.M-Home:perl:font-size:decrease
URxvt.keysym.M-End:perl:font-size:increase

Offline

#14 2018-02-27 21:35:45

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,925

Re: xlockmore can't find fonts to display messages

Warning: Unable to load any usable ISO8859 font

xorg-fonts-misc has many iso 88591 fonts, is that installed ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#15 2018-02-28 09:20:23

Doron.Behar
Member
Registered: 2016-12-21
Posts: 36

Re: xlockmore can't find fonts to display messages

Yea, that worked.

I guess that solves the issue? Perhaps these packages should be added to `xlock`'s dependencies?

Offline

#16 2018-02-28 11:45:02

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,925

Re: xlockmore can't find fonts to display messages

looks like there's a post install message that should help to realise that.

Maybe adding some font packages as optional depednecy would be be more useful (at the very least those are more visible then .install messages)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB