Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
xlsfonts fail to detect installed font...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
houkensjtu
n00b
n00b


Joined: 08 Jan 2014
Posts: 6

PostPosted: Wed Jan 08, 2014 12:54 pm    Post subject: xlsfonts fail to detect installed font... Reply with quote

Hi all!

Recently I installed the famous otf font inconsolata by emerging it.
Then I tried to apply it to my emacs by adding the following line to .Xresources.
emacs.font : inconsolata:style=medium
which gave me the error:
Font 'inconsolata:style=medium' is not defined.

I somehow figured out that emacs font can't be configured by fontconfig library.
Instead it follows the XLFD config. So I tried to find inconsolata by:
xlsfonts
but inconsolata is not there.

Then I tried to manually add the inconsolata font dir by
xset +fp /usr/share/fonts/inconsolata
xset fp rehash
All these finished without any error message but still, I can't find inconsolata
in the output of xlsfonts...

Plz help!!!
Back to top
View user's profile Send private message
v_andal
Guru
Guru


Joined: 26 Aug 2008
Posts: 319
Location: Germany

PostPosted: Thu Jan 09, 2014 9:08 am    Post subject: Reply with quote

Are you sure that it does not work? I've performed all of the xset manipulations as you did then run

xlsfonts | grep incon

and I got

Quote:

-misc-inconsolata-medium-r-normal--0-0-0-0-p-0-ascii-0
-misc-inconsolata-medium-r-normal--0-0-0-0-p-0-iso10646-1
-misc-inconsolata-medium-r-normal--0-0-0-0-p-0-iso8859-1
-misc-inconsolata-medium-r-normal--0-0-0-0-p-0-iso8859-15
-misc-inconsolata-medium-r-normal--0-0-0-0-p-0-iso8859-2
-misc-inconsolata-medium-r-normal--0-0-0-0-p-0-iso8859-9


Besides. According to this http://www.gnu.org/software/emacs/manual/html_node/emacs/Fonts.html page emacs does understand font names from Fontconfig.
Possibly you should simply try Inconsolata as font name.
Back to top
View user's profile Send private message
houkensjtu
n00b
n00b


Joined: 08 Jan 2014
Posts: 6

PostPosted: Thu Jan 09, 2014 12:03 pm    Post subject: Reply with quote

I re-checked every command and I am sure that xlsfonts
did not give me inconsolata. Really strange...
I checked my Xorg.0.log file and there wasn't any useful
clues.

But I fixed my emacs because I found that I didn't enable
the "xft" USE flag, and after recompile now emacs could
accept fontconfig fonts.

Still I am wondering what's happening behind xlsfonts and why
it can't detect inconsolata... Plz help!
Back to top
View user's profile Send private message
houkensjtu
n00b
n00b


Joined: 08 Jan 2014
Posts: 6

PostPosted: Thu Jan 09, 2014 12:15 pm    Post subject: Reply with quote

btw, the only reason I could figure out is that, the xlsfonts and xfontsel package
on my gentoo was installed manually after xserver is installed.
So I guess there may be some dependency problem ?
And I knew that Xorg will contain much more packages than xserver. Maybe some
necessary packages were missed in xserver??
Back to top
View user's profile Send private message
v_andal
Guru
Guru


Joined: 26 Aug 2008
Posts: 319
Location: Germany

PostPosted: Fri Jan 10, 2014 8:55 am    Post subject: Reply with quote

I've also installed xlsfonts manually. This program is barely needed these days. Portage is very good at tracing dependencies so, your problem definitely has nothing to do with that. Did you make sure that xset has added your font path? Try to run "xset q" and see what is in your FontPath. I can't offer anything else. As I said, everything works for me, so I can't help with searching.
Back to top
View user's profile Send private message
Tractor Girl
Apprentice
Apprentice


Joined: 16 May 2013
Posts: 159

PostPosted: Mon Feb 24, 2014 4:38 pm    Post subject: Reply with quote

I have excatly the same problem, both xfontsel and xlsfonts fail to detect any of my fonts ("fixed" is the only one they can see).
I tried xset +fp with paths to my fonts (in both /usr/share/fonts and ~/.fonts) and xset rehash, but this doesn't work.

Before I manually add font paths, xset q shows only:
Code:
$ xset q
(...)
Font Path:
built-ins
(...)

I don't know if this is how it should be in Gentoo (in Debian, there're full font paths in there)

BTW
I've also installed xfontsel, xlsfonts and xset manually.
Back to top
View user's profile Send private message
v_andal
Guru
Guru


Joined: 26 Aug 2008
Posts: 319
Location: Germany

PostPosted: Tue Feb 25, 2014 7:44 am    Post subject: Reply with quote

Tractor Girl wrote:
I have excatly the same problem, both xfontsel and xlsfonts fail to detect any of my fonts ("fixed" is the only one they can see).
I don't know if this is how it should be in Gentoo (in Debian, there're full font paths in there)


In general, the FontPath is populated by providing section Files in xorg.conf. Nowadays people run Xorg without any configuration file, so no wonder that FontPath stays empty. You can try to create /etc/X11/xorg.conf (or /etc/X11/xorg.conf.d/fonts.conf) and put there

Quote:

Section "Files"
FontPath "/usr/share/fonts/misc"
FontPath "desired/path"
FontPath "desired/path"
EndSection
Back to top
View user's profile Send private message
Tractor Girl
Apprentice
Apprentice


Joined: 16 May 2013
Posts: 159

PostPosted: Sat Mar 01, 2014 2:00 pm    Post subject: Reply with quote

I've created /etc/X11/xorg.conf.d/15-fonts.conf.
xset q now shows the fonts paths but xlsfonts and xfontsel still cannot see them :(
Back to top
View user's profile Send private message
v_andal
Guru
Guru


Joined: 26 Aug 2008
Posts: 319
Location: Germany

PostPosted: Mon Mar 03, 2014 8:20 am    Post subject: Reply with quote

Then you have to specify which fonts you are missing. It might be that those fonts are not supported by xlsfonts. BTW, why do you need these programs to work? As far as I know, most (if not all) applications now support Fontconfig.
Back to top
View user's profile Send private message
Tractor Girl
Apprentice
Apprentice


Joined: 16 May 2013
Posts: 159

PostPosted: Sun Mar 09, 2014 5:11 pm    Post subject: Reply with quote

It's working!
I created again /etc/X11/xorg.conf.d/15-fonts.conf
and I run inside all directories with fonts:
Code:
mkfontdir
mkfontscale


I need it to setup font in dwm. I know there's xft patch but I try to keep things as minimal as I can (I can't live without bstack patch, though :cry: )

Thank you v_andal :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum