You are not logged in.

#1 2020-08-05 03:06:38

ivysly
Member
Registered: 2020-08-05
Posts: 5

Cannot set any font paths with "xset fp+", always gives the same error

Hello all. I've been having trouble installing a handful of fonts as per the wiki's instructions. I'll admit I have not yet tried creating a package with pacman, but I do want to understand why this is failing for me when it ostensibly shouldn't be.

Whenever I use the

xset fp+ <dir>

command, it fails every time, even after using mkfontdir and mkfontscale in the directories i'm trying to set.

here's the error message i'm getting.
in /usr/share/fonts/misc/<my font>

% sudo mkfontscale                              
% sudo mkfontdir                                
% xset fp+ .                                    
xset:  bad font path element (#95), possible causes are:
    Directory does not exist or has wrong permissions
    Directory missing fonts.dir
    Incorrect font server address or syntax

i've tried this multiple times in multiple locations, and with sudo, and the error message is always the same (though the number sometimes changes). Frankly I'm not really sure how to tackle this problem. The directory does exist, there is a generated fonts.dir, but i'm not sure exactly what it means by "font server address". I've googled the error, but I've only found other people facing the same issue (on multiple different distributions of Linux), and any solution given to them has not worked for me.

I can install fonts fine with fontconfig, and the fonts I have installed to /usr/share/fonts/misc do show up in fc-list. However, not all the applications I use rely on fontconfig, and so can't use the fonts it detects exclusively. I can give any other information needed about my system. Thanks smile

Last edited by ivysly (2020-08-05 17:02:03)

Offline

#2 2020-08-05 07:33:11

seth
Member
Registered: 2012-09-03
Posts: 49,985

Re: Cannot set any font paths with "xset fp+", always gives the same error

% xset fp+ .                                    /usr/share/fonts/misc/iv
           ^

Offline

#3 2020-08-05 16:48:38

ivysly
Member
Registered: 2020-08-05
Posts: 5

Re: Cannot set any font paths with "xset fp+", always gives the same error

is . not a synonym for "current directory"? in any case, i have used this command directly specifying the folder as well, to the same effect.

Offline

#4 2020-08-05 16:52:26

seth
Member
Registered: 2012-09-03
Posts: 49,985

Re: Cannot set any font paths with "xset fp+", always gives the same error

Yes, but
a) nowhere above was suggested that $PWD is a legit font path (and the errors suggest it is not)
b) xset fp+ takes a comma separated list if you want to append multiple paths

Offline

#5 2020-08-05 16:59:33

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,445
Website

Re: Cannot set any font paths with "xset fp+", always gives the same error

Is `xset fp+ <dir1> <dir2>` even expected to work?  In all the documentation it is only `xset +fp <dir>` in a for loop through the directories.  So note two differences: whether xset can accept multiple path parameters (without the above-mentioned comma separated list) and whether "fp+" works the same as "+fp".

EDIT: oops, sorry, nevermind the point on fp+ vs +fp, I'm not sure how I missed that.

Last edited by Trilby (2020-08-05 17:09:30)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#6 2020-08-05 17:01:12

ivysly
Member
Registered: 2020-08-05
Posts: 5

Re: Cannot set any font paths with "xset fp+", always gives the same error

sorry, i didnt think to mention - that is just my zsh theme. that second path shown in my paste is just the current directory. i'll edit for clarity.

Offline

#7 2020-08-05 17:01:14

seth
Member
Registered: 2012-09-03
Posts: 49,985

Re: Cannot set any font paths with "xset fp+", always gives the same error

The position of the "+" controls the insertion of the font path. fp+ appends is (check the xset help)

Offline

#8 2020-08-05 17:13:36

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,445
Website

Re: Cannot set any font paths with "xset fp+", always gives the same error

I just did some testing here, and "." is not accepted and gives the same error as in OP, but $PWD is accepted.  This should be no suprise (in hindsight) as "." is not expanded by the shell in prior to passing the argument (while $PWD is).

Last edited by Trilby (2020-08-05 17:13:54)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#9 2020-08-05 17:14:06

ondoho
Member
Registered: 2013-04-30
Posts: 692
Website

Re: Cannot set any font paths with "xset fp+", always gives the same error

The '.' is wrong, needs to be an absolute path. Actually using $PWD works.

Offline

#10 2020-08-05 17:17:20

ivysly
Member
Registered: 2020-08-05
Posts: 5

Re: Cannot set any font paths with "xset fp+", always gives the same error

Thanks, but, and I suppose I wasn't clear here, the problem persists when i actually write the full path, too.

Offline

#11 2020-08-05 17:27:18

ondoho
Member
Registered: 2013-04-30
Posts: 692
Website

Re: Cannot set any font paths with "xset fp+", always gives the same error

ivysly wrote:
                          
% xset fp+ .                                    
xset:  bad font path element (#95), possible causes are:
    Directory does not exist or has wrong permissions
    Directory missing fonts.dir
    Incorrect font server address or syntax

Have you investigated/eliminated all these possible causes?
(TBH, I have no answer what the last one means but I'm sure you will find out)

Offline

#12 2020-08-05 17:29:43

ivysly
Member
Registered: 2020-08-05
Posts: 5

Re: Cannot set any font paths with "xset fp+", always gives the same error

Yeah, I have experimented with both of the first two possible causes, but like you I dont understand the third line.

...In any case, after troubleshooting and rebooting a few times... it's working. I don't really know what changed, but that solves that, I suppose.

Offline

Board footer

Powered by FluxBB