You are not logged in.

#1 2005-08-29 20:49:00

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

New fonts don't show up in xfontsel

I have installed some new fonts in /usr/X11R6/lib/X11/fonts/TTF/
I have updated the cache.  The new fonts shows up in the font selection menu of firefox and gnome-control-center.  However, xfig cannot find one of them and they don't show up in xfontsel.
Any ideas?

Offline

#2 2005-08-29 21:02:43

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: New fonts don't show up in xfontsel

Snowman wrote:

I have installed some new fonts in /usr/X11R6/lib/X11/fonts/TTF/
I have updated the cache.  The new fonts shows up in the font selection menu of firefox and gnome-control-center.  However, xfig cannot find one of them and they don't show up in xfontsel.
Any ideas?

Hmmm, check some of the .install files in the font packages somewhere in abs... there's like 4 or 5 steps... make sure each dir has it's own fonts.alias, fonts.scale and fonts.dir.

IIRC updating the fontconfig cache doesn't do anything for xlsfonts, as it doesn't use fontconfig - did you do the "xset -fp rehash" stuff?

Offline

#3 2005-08-29 21:34:00

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: New fonts don't show up in xfontsel

phrakture wrote:

Hmmm, check some of the .install files in the font packages somewhere in abs... there's like 4 or 5 steps... make sure each dir has it's own fonts.alias, fonts.scale and fonts.dir.

That's what I did. I used ttf-cheapskate as an example.
PKGBUILD:

pkgname=ttf-corel-fonts
pkgver=7.0
pkgrel=1
pkgdesc="TTFonts collection from Corel"
url="http://www.corel.com/"
depends=("x-server")
install=ttf.install
source=(corel-fonts.tar.gz)
md5sums=('c858fe04357ff836e3120cf4e5a49d4f')

build() {
  cd $startdir/src/
  mkdir -p  $startdir/pkg/usr/X11R6/lib/X11/fonts/TTF
  cp *.ttf $startdir/pkg/usr/X11R6/lib/X11/fonts/TTF
}

ttf.install:

# arg 1:  the new package version
post_install() {
  echo -n "Updating font cache... "
  /usr/bin/fc-cache
  cd /usr/X11R6/lib/X11/fonts/TTF
  /usr/X11R6/bin/mkfontdir
  /usr/X11R6/bin/mkfontscale
  cp ../encodings/encodings.dir ./encodings.dir
  echo "done."
}

# arg 1:  the new package version
# arg 2:  the old package version
post_upgrade() {
  post_install $1
}

# arg 1:  the old package version
post_remove() {
  post_install $1
}

op=$1
shift

$op $*
phrakture wrote:

IIRC updating the fontconfig cache doesn't do anything for xlsfonts, as it doesn't use fontconfig - did you do the "xset -fp rehash" stuff?

I ran "xset -fp rehash"  in /usr/X11R6/lib/X11/fonts/TTF and I got an

xset:  warning, no entries deleted from font path.

Could be because these are ttf fonts.

Offline

#4 2005-08-29 21:55:32

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: New fonts don't show up in xfontsel

I ran "xset -fp rehash" in /usr/X11R6/lib/X11/fonts/TTF and I got an
Code:   
xset:  warning, no entries deleted from font path.   
Could be because these are ttf fonts.

No. It should be:

xset fp rehash

no "-" before fp. "-fp" means remove font path.

Offline

#5 2005-08-29 22:06:40

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: New fonts don't show up in xfontsel

lanrat wrote:

No. It should be:

xset fp rehash

no "-" before fp. "-fp" means remove font path.

Ahhhh...

Offline

#6 2005-08-29 22:27:56

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: New fonts don't show up in xfontsel

Thanks. "xset fp rehash" worked. The fonts are now in xfontsel. xfig still doesn't work but it's probably an xfig config issue. I'll need to investigate.  But it's no big deal. I can replace the missing bullet by a *

EDIT: The fonts for xfig are hard-coded in. I patched the code and it works.

Offline

#7 2007-11-09 01:42:00

atordo
Member
Registered: 2007-04-21
Posts: 147

Re: New fonts don't show up in xfontsel

Snowman wrote:

EDIT: The fonts for xfig are hard-coded in. I patched the code and it works.

I know this is an old thread, but just installed xfig and can't figure how to use any font, as it can't find them. Could you publish the patch anywhere?

I also suggest to apply this patch in the official Arch package, as xfig is quite limited as it comes now.

Offline

Board footer

Powered by FluxBB