Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Right way to "install" fonts
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
norg
Tux's lil' helper
Tux's lil' helper


Joined: 23 Aug 2010
Posts: 102
Location: Augsburg (Germany)

PostPosted: Wed Feb 13, 2013 6:55 pm    Post subject: Right way to "install" fonts Reply with quote

Hi,

i'm looking for the "right" way to install fonts. After i emerged fonts like terminus i need to do one of the two things:

1. Add the fontpath in the xorg.conf
2. Add "xset +fp /usr/share/fonts/terminus" in my .xinitrc

Is it really necesary to do one of the ways? or is there an even better systemwide way?
Back to top
View user's profile Send private message
eyoung100
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1411

PostPosted: Wed Feb 13, 2013 10:56 pm    Post subject: Reply with quote

See Here:
[Howto] Xorg & X Font Server & Fonts
_________________
The Birth and Growth of Science is the Death and Atrophy of Art -- Unknown
Registerd Linux User #363735
Adopt a Post | Strip Comments| Emerge Wrapper
Back to top
View user's profile Send private message
norg
Tux's lil' helper
Tux's lil' helper


Joined: 23 Aug 2010
Posts: 102
Location: Augsburg (Germany)

PostPosted: Wed Feb 13, 2013 11:38 pm    Post subject: Reply with quote

this is from 2004...most of the stuff is outdated :/
Back to top
View user's profile Send private message
Ant P.
Advocate
Advocate


Joined: 18 Apr 2009
Posts: 2403
Location: UK

PostPosted: Thu Feb 14, 2013 2:42 am    Post subject: Reply with quote

norg wrote:
this is from 2004...most of the stuff is outdated :/

As are the methods you're using. What software are you using that isn't picking up the fonts automatically via fontconfig/Xft?
Back to top
View user's profile Send private message
norg
Tux's lil' helper
Tux's lil' helper


Joined: 23 Aug 2010
Posts: 102
Location: Augsburg (Germany)

PostPosted: Thu Feb 14, 2013 2:20 pm    Post subject: Reply with quote

dmenu, rxvt-unicode, xfontsel, thunar, firefox, vim etc.

i can reproduce it for media-fonts/terminus-font, media-fonts/proggy-fonts, media-fonts/dina

and this is the reason why i'm asking for the method i need to use nowadays.
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1695

PostPosted: Fri Feb 15, 2013 9:36 am    Post subject: Reply with quote

fc-cache and fc-list _ought_ to work; their man pages may be missing, though,
so you'll have to dig them out of the package. I've found that I sometimes need
to clear the caches and re-run fc-cache; very occasionally I've added a fonts.dir
file by hand. (mkfontdir creates a list of fonts in a directory, but doesn't add an
empty fonts.dir) The best way of listing font paths seems to be "xset -q"

Will
Back to top
View user's profile Send private message
norg
Tux's lil' helper
Tux's lil' helper


Joined: 23 Aug 2010
Posts: 102
Location: Augsburg (Germany)

PostPosted: Fri Feb 15, 2013 2:45 pm    Post subject: Reply with quote

xset -q doesn't list them unless i add them to xorg.conf or with xset +fp.
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1695

PostPosted: Sat Feb 16, 2013 3:38 pm    Post subject: Reply with quote

Well, I don't have an xorg.conf and I can't recall ever using xset, so something's
off somewhere. Perhaps I use only the default font locations.

Will
Back to top
View user's profile Send private message
norg
Tux's lil' helper
Tux's lil' helper


Joined: 23 Aug 2010
Posts: 102
Location: Augsburg (Germany)

PostPosted: Sat Feb 16, 2013 4:28 pm    Post subject: Reply with quote

do you use such fonts as i emerged?
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Sat Feb 16, 2013 4:53 pm    Post subject: Reply with quote

norg,

Did you check the output of eselect fontconfig list :?:
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
norg
Tux's lil' helper
Tux's lil' helper


Joined: 23 Aug 2010
Posts: 102
Location: Augsburg (Germany)

PostPosted: Sat Feb 16, 2013 8:08 pm    Post subject: Reply with quote

yes but i can't see any option related to my issue
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1695

PostPosted: Sun Feb 17, 2013 10:12 am    Post subject: Reply with quote

Ok, a bit more digging and the machine which accesses a lot of fonts seems to
still have an xorg.conf. The one without xorg.conf just has the standard path
(I don't know where it's set). It looks as if "xset fp+ ..." and "xset fp rehash"
is the standard way to go.

Will
Back to top
View user's profile Send private message
norg
Tux's lil' helper
Tux's lil' helper


Joined: 23 Aug 2010
Posts: 102
Location: Augsburg (Germany)

PostPosted: Mon Feb 18, 2013 1:00 pm    Post subject: Reply with quote

It looks like it, yes. I thought there would be a much better way nowadays :)
Back to top
View user's profile Send private message
wjb
Guru
Guru


Joined: 10 Jul 2005
Posts: 355
Location: Fife, Scotland

PostPosted: Mon Feb 18, 2013 7:13 pm    Post subject: Reply with quote

I just tried:

  • emerge terminus-font
  • restarted X

Terminus appeared in font lists in applications, e.g Konsole

It doesn't show up anywhere obvious in the output from eselect fontconfig list
Back to top
View user's profile Send private message
norg
Tux's lil' helper
Tux's lil' helper


Joined: 23 Aug 2010
Posts: 102
Location: Augsburg (Germany)

PostPosted: Mon Feb 18, 2013 8:10 pm    Post subject: Reply with quote

What windowmanager are you using? did you enter any xorg.conf or anything?

I'm using i3wm
Back to top
View user's profile Send private message
wjb
Guru
Guru


Joined: 10 Jul 2005
Posts: 355
Location: Fife, Scotland

PostPosted: Tue Feb 19, 2013 12:52 am    Post subject: Reply with quote

kde4/kwin

Minimal xorg.conf, no font stuff
Back to top
View user's profile Send private message
norg
Tux's lil' helper
Tux's lil' helper


Joined: 23 Aug 2010
Posts: 102
Location: Augsburg (Germany)

PostPosted: Tue Feb 19, 2013 8:13 am    Post subject: Reply with quote

then it seems, that kde/kwin itself is searching for the fonts.
Back to top
View user's profile Send private message
v_andal
Guru
Guru


Joined: 26 Aug 2008
Posts: 308
Location: Germany

PostPosted: Wed Feb 20, 2013 7:58 am    Post subject: Reply with quote

There's no universal fonts handling. Well, most of modern applications rely on fontconfig. For those applications nothing special has to be done, since the font by default is installed into directory known to fontconfig and all necessary actions are taken to add new font to the list.

But I guess there are still applications out there that don't know how to use fontconfig. Those may still rely on fonts being in directories known to xorg. Personally, I haven't used such applications recently, so I can't provide examples.

Like many others, I do use Terminus and proggy fonts and they show up without any tweaking in gvim and xfce-terminal. They are not visible in xfontsel, which does not bother me. Again, I don't have any application that would pick-up fonts using old way.

So, if some application does not see these fonts, then you should provide information about that application, then someone may be able to give more specific advice. Without those details, I can only say, that fontconfig may exclude bitmap fonts from the list. There's configuration file that does this. Check output of eselect fontconfig list and search for 70-no-bitmaps.conf
Back to top
View user's profile Send private message
norg
Tux's lil' helper
Tux's lil' helper


Joined: 23 Aug 2010
Posts: 102
Location: Augsburg (Germany)

PostPosted: Wed Feb 20, 2013 11:27 am    Post subject: Reply with quote

I'm working most of the time within the terminal, so the affected applications are:

x11-terms/rxvt-unicode
app-editors/vim
x11-misc/dmenu
x11-wm/i3

But for example changing urxvt to xterm, same issue.

And eselect fontconfig lists says that bitmap fonts are enabled and "no-bitmaps" is not activated.

Thanks for the hints so far!
Back to top
View user's profile Send private message
v_andal
Guru
Guru


Joined: 26 Aug 2008
Posts: 308
Location: Germany

PostPosted: Thu Feb 21, 2013 8:12 am    Post subject: Reply with quote

Well, vim itself does not use any fonts. It relies on the terminal to handle this stuff. Only gvim is capable of handling fonts, and when it is compiled with gtk, then it can use fonts provided by the fontconfig. If another toolkit is used, then you may have to provide fonts using old way.

I don't know much about rxvt-unicode (I prefer xfce-terminal for unicode stuff). But I'm pretty sure, that xterm does not know how to use fontconfig. It expects font names like -misc-fixed-medium-r-semicondensed-*-13-*-*-*-*-*-*-* which comes from old system and is not supported by fontconfig. So, if you want to use Terminus with this application then you have to add the directory /usr/share/fonts/terminus/ to the FontPath. By default it is not added.

Checking the configuration for i3, it seems, that it also does not use fontconfig for obtaining fonts. It expects the same font names as xterm. So, I guess the same stuff applies to i3 as to xterm.
Back to top
View user's profile Send private message
norg
Tux's lil' helper
Tux's lil' helper


Joined: 23 Aug 2010
Posts: 102
Location: Augsburg (Germany)

PostPosted: Thu Feb 21, 2013 8:54 am    Post subject: Reply with quote

v_andal wrote:
It expects font names like -misc-fixed-medium-r-semicondensed-*-13-*-*-*-*-*-*-* which comes from old system and is not supported by fontconfig.

Yes, same with i3, "font -xos4-terminus-medium-r-*--12-*-*-*-*-*-iso10646-1". So i guess if i want to use that sort of fonts (not Xft etc.) then i have to stick with xorg.conf/xset :/

thanks
Back to top
View user's profile Send private message
v_andal
Guru
Guru


Joined: 26 Aug 2008
Posts: 308
Location: Germany

PostPosted: Fri Feb 22, 2013 8:09 am    Post subject: Reply with quote

norg wrote:
So i guess if i want to use that sort of fonts (not Xft etc.) then i have to stick with xorg.conf/xset :/


I would say "If you want to use that sort of applications, then you have to stick with xorg.conf". No, I don't have anything against the applications, just want to make clear, that this sort of fonts is perfectly usable without xorg.conf :)
Back to top
View user's profile Send private message
norg
Tux's lil' helper
Tux's lil' helper


Joined: 23 Aug 2010
Posts: 102
Location: Augsburg (Germany)

PostPosted: Fri Feb 22, 2013 9:12 am    Post subject: Reply with quote

Thanks for the replies :) it's no big deal to set up the xorg.conf or xset fp and for now i know why it's still needed in my case.
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