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

List:       kde-devel
Subject:    Re: Qt, Xft[2], FontConfig, FreeType2  HOWTO
From:       James Richard Tyrer <tyrerj () acm ! org>
Date:       2002-11-26 3:03:49
[Download RAW message or body]

I attach the first draft of my HOWTO based in what I did to get this 
stuff to all work.

Note that this is for installing them all from source.

You want to get the current versions of FCPackage (2.1) and FreeType 
(2.1.2).

Also, I have XFree86 4.2.1 installed from the xfree86.org binaries.

Please post you comments, corrections, and experiences.

--
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. 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.

5.  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

6.  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

7.  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.

8.  Install: "Xft1":

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

	xmkmf -a -DHasFreetype2 -DUseFreetype2

	make

	make install

	ldconfig


9.  Install "Xrender"

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

	xmkmf -a -DHasFreetype2 -DUseFreetype2

	make

	make install

	ldconfig


10.  Then you need to rebuild Qt-3.1.0.

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 paramater:
"-I/usr/local/include" is necessary for Qt to autodetect Xft. 
I'm not certain about using: "-L/usr/local/lib" but it doesn't
hurt.

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.

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 recursivly, 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 by 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

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