You are not logged in.

#1 2009-01-24 13:49:06

skorpan
Member
Registered: 2007-11-09
Posts: 81

How do I install fonts?

I'm having trouble making X recognize a bunch of fonts that I have installed. I installed "ttf-apple-fonts" and I see the files in /usr/share/fonts/TTF along with other fonts that are recognized and show up in xfontsel. I installed artwiz-fonts as well, but they don't show up either, which I can understand since they are in /usr/share/fonts/artwiz-fonts, which isn't a "standard" font path.

So, my question is: how do I install fonts? My xorg.conf is completely empty and I have no idea where to go from here. The wiki doesn't seem to be very up-to-date.

Offline

#2 2009-01-24 15:32:24

pointone
Wiki Admin
From: Waterloo, ON
Registered: 2008-02-21
Posts: 379

Re: How do I install fonts?

I believe you'll need to run "fc-cache -vf" as root, and of course, restart your X server.


M*cr*s*ft: Who needs quality when you have marketing?

Offline

#3 2009-01-24 16:06:02

skorpan
Member
Registered: 2007-11-09
Posts: 81

Re: How do I install fonts?

Unfortunately, that too didn't work. I get even more confused because no matter how many times in a row I run fc-cache -fv (as root), it tells me it found new content every time.

$ sudo fc-cache -fv
/usr/share/fonts: caching, new cache contents: 0 fonts, 9 dirs
/usr/share/fonts/100dpi: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/75dpi: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/TTF: caching, new cache contents: 78 fonts, 0 dirs
/usr/share/fonts/Type1: caching, new cache contents: 35 fonts, 0 dirs
/usr/share/fonts/artwiz-fonts: caching, new cache contents: 17 fonts, 0 dirs
/usr/share/fonts/cyrillic: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/encodings: caching, new cache contents: 0 fonts, 1 dirs
/usr/share/fonts/encodings/large: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/misc: caching, new cache contents: 59 fonts, 0 dirs
/usr/share/fonts/util: caching, new cache contents: 0 fonts, 0 dirs
/home/skorpan/.fonts: skipping, no such directory
/var/cache/fontconfig: cleaning cache directory
/home/skorpan/.fontconfig: cleaning cache directory
fc-cache: succeeded

I did this AND restarted X several times and even tried a reboot, but still the same thing happens. The fonts just won't show up in xfontsel.

Offline

#4 2009-01-24 17:08:27

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: How do I install fonts?

Do you really need xfontsel? Most apps use freetype/fontconfig and don't need the X font system (btw fc-cache is for freetype/fontconfig).

You probably need to add all these font paths with FontPath lines in xorg.conf. Maybe check grep -i fontpath /var/log/Xorg.0.log to see the current ones.

Btw, also check out http://bbs.archlinux.org/viewtopic.php? … 18#p340318
When I tried to made a minimal xorg.conf, one of the only thing I needed was that Files section for the FontPath. I needed that back then because I was using dwm which does not support fontconfig, but these apps are quite rare.

Last edited by shining (2009-01-24 17:13:40)


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#5 2009-01-24 18:30:00

skorpan
Member
Registered: 2007-11-09
Posts: 81

Re: How do I install fonts?

In fact, it seems that I successfully installed the fonts, but xfontsel won't recognize them, probably because of what you just said, with xorg.conf. As I said, my xorg.conf is now completely empty. I tried to add the Files section to it earlier but it complained about unexpected EOF, "possibly missing EndSection?" when I actually had a completely syntactically correct xorg.conf, as far as I could see.

The reason that I want xfontsel is so that I can easily select a font to use with my Emacs. Any ideas on how to list the fonts in fontconfig? And am I able to use fontconfig fonts in .Xdefaults?

Offline

#6 2009-01-24 18:37:07

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: How do I install fonts?

Try fc-list to see the list of fonts.
About .Xdefaults, it really depends on which options you are using there. Since you mentioned emacs, this should work :
  Emacs.font: Bitstream Vera Sans Mono-8


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#7 2009-01-24 18:56:51

skorpan
Member
Registered: 2007-11-09
Posts: 81

Re: How do I install fonts?

Yeah, I googled a bit and found that that should work, but for some reason it doesn't. Instead I put (set-default-font "Font here") in my .emacs to get it to work. However, that way I can't seem to get antialiasing, for some reason. I'm using the CVS Emacs from January 15.

Offline

#8 2009-02-06 03:06:40

Basu
Member
From: Cornell University
Registered: 2006-12-15
Posts: 296
Website

Re: How do I install fonts?

Here's the solution to the anti-aliasing problem: Add the following to your .emacs:

(set-frame-parameter nil 'font-backend '(xft))

Enjoy the beauty.

Last edited by Basu (2009-02-06 04:13:21)


The Bytebaker -- Computer science is not a science and it's not about computers
Check out my open source software at Github

Offline

Board footer

Powered by FluxBB