[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Installing FCPackage from source
From:       James Richard Tyrer <tyrerj () acm ! org>
Date:       2002-12-29 0:59:10
[Download RAW message or body]

Attached is a description of my adventures in installing FCPackage-2.1.

I left out all of the mistakes. :-)

I think that if you follow these instruction that it will work.  But, if you have problems, 
please advise.

--
JRT

["install-FCPackage.txt" (text/plain)]

FontConfig HOWTO {Beta 1}

To install from source:

1.  Install the latest version of FreeType2 with:

	--prefix=/usr/local

2.  Remove these files and directories:

	/usr/X11R6/bin/freetype-config
	/usr/X11R6/include/freetype2/
	/usr/X11R6/lib/libfreetype.*

You may get very odd build errors if you don't remove them.

BUT, DO NOT remove anything in:

	/usr/X11R6/lib/modules/

3.  Be sure that the directory:

	/usr/local

is in your: "ld.so.conf" file and execute: "ldconfig".

4.  Save the file: /usr/X11R6/include/X11/Xft/Xft.h

5.  Unpack the FCPackage tarball in: "/usr/src/".  There are 4
separate packages in it:

	fontconfig
	Xft {this is Xft-2}
	Xft1
	Xrender

which need to be installed separately.

6.  Install: "fontconfig":

	cd /usr/src/fcpackage.2_x/fontconfig

	./configure --prefix=/usr/X11R6 --sysconfdir=/etc \ 
	--with-freetype-includes=/usr/local/include/freetype2 
	
	make
	
	make install

	ldconfig

7.  Install: "Xft":

	cd /usr/src/fcpackage.2_x/Xft

	./configure --prefix=/usr/X11R6 --sysconfdir=/etc \ 
	--with-freetype-includes=/usr/local/include/freetype2 \
	--with-fontconfig-includes=/usr/X11R6/include

	make

Then before you install, remove the old files::

	/usr/X11R6/lib/libXft.so*

Then:

	make install

	ldconfig

8.  Edit the file:

	/usr/X11R6/lib/X11/config/X11.tmpl

[yes that is the file that says: DO NOT EDIT]

Change the line:

	#define Freetype2Dir /usr

to:

	#define Freetype2Dir /usr/local


so that it indicates the correct location for FreeType2.

9.  Install: "Xft1":

	
	cd /usr/src/fcpackage.2_x/Xft1

	xmkmf -a -DHasFreetype2 -DUseFreetype2

	make

	make install

	ldconfig


10.  Install "Xrender"

	cd /usr/src/fcpackage.2_x/Xrender

	xmkmf -a -DHasFreetype2 -DUseFreetype2

	make

	make install

	ldconfig


11.  Then you need to rebuild Qt-3.1.0.

And, now we come the the: "Xft.h" problem.

You now have three: "Xft.h" files?

	The one you saved from: /usr/X11R6/include/X11/Xft/"
	The one in: "/usr/src/fcpackage.2_x/fontconfig/Xft/"
	The one in: "/usr/src/fcpackage.2_x/fontconfig/Xft1/" 

They should be interchangeable but they are NOT.

I suggest that you use the one in:

	/usr/src/fcpackage.2_x/fontconfig/Xft/

so copy it:

	cp /usr/src/fcpackage.2_x/fontconfig/Xft/Xft.h  /usr/X11R6/include/X11/Xft/

NOTE: I use this command line for configuring Qt-3.1.0. 
	
	./configure -L/usr/local/lib -I/usr/local/include \
	-system-zlib -qt-gif -system-libpng -system-libjpeg \
	-system-libmng -thread -no-xinerama -no-g++-exceptions \

If you don't want to use the system library for JPEG, PNG, &/|
MNG, make the necessary changes.

If you have installed FreeType2 in: "/usr/local/", the parameter:
"-I/usr/local/include" is necessary for Qt to auto detect Xft. 
I'm not certain about using: "-L/usr/local/lib" but it doesn't
hurt.

12.  You should check for any old cache files in your font
directories, remove them, and then execute [as root]:

	fc-cache -v

to make new caches.

13. You might need to edit the: "/etc/fonts/fonts.conf" 
configuration file.  If so, note that when you run: "fc-cache" 
that it searches the directories recursively, so you only need
the directory at the root of font trees.

Specifically:

If you have installed KDE in a directory other than: "/usr/" you
need to add a directory path for the fonts installed for Konsole. 
For example if you installed in the default: "/usr/kde3/" then
add:

	<dir>/usr/kde3/share/fonts</dir>

Don't bother running: "fc-cache" yet since it won't do any good
(see below)

If you have locally installed fonts under KDE, then you need to
add:

	<dir>~/.kde/share/fonts</dir>

and then execute for each user:

	fc-cache -v

14.  Then we come to the font problem with Konsole.  The current
version of FontConfgure apparently does not deal with gzipped
fonts, so you don't get the correct bit-mapped fonts in Konsole.

To fix this:

	cd $KDEDIR/share/fonts
	gunzip 9x15.pcf.gz
	mkfontdir
	cd /usr/X11R6/lib/X11/fonts/misc
	gunzip 5x7.pcf.gz 6x10.pcf.gz 7x13.pcf.gz 10x20.pcf.gz
	mkfontdir

then execute [as root]:

	fc-cache -v








>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic