Hi ppl, A while ago I promised to make a garball for fontconfig. I did some feeble attempt for it, but I really didn't want to screw up my gnome2 for it. I was badly needing it to get some work done. But this weekend I started compiling Garnome 0.16 from scratch, normally I just look at the diff. And yesterday-evening I compiled fontconfig for this fresh and thus still warm installation of gnome 2.0.2. I kept some notes on my progress and steps I made, so I could share it with you guys. Well... here it is: First of all I installed gnome2 in /opt/garnome, so please change any references to this directory for your installation-directory of gnome. The first step I took was installing the latest freetype in the garnome-tree and compile it. I attached a garball for this purpose - unpack free-garball in garnome-tree - cd gnome/freetype - make install - cd ../pango - make clean - make install So far no fontconfig stuff, the pango recompile isn't even needed. But it does confirm you have freetype running properly. You should also make sure pango uses the correct freetype libraries. You can do this with 'ldd', but you do need to set 'LD_LIBRARY_PATH' correctly before checking. At this point you could be happy with the newest freetype. The following steps probably also work with the freetype already installed in your system, which is most likely to be 2.0.9. First you will need to grab the fontconfig-package from the website (www.fontconfig.org). It talks about a 2.0 download somewhere. Unpack it somewhere, e.g. under /usr/src - cd /usr/src/fcpackage.2_0/fontconfig/ - ./configure --prefix=/opt/garnome --with-confdir=/opt/garnome/etc/fonts --with-freetype-includes=/opt/garnome/include/freetype2/ --with-freetype-lib=/opt/garnome/lib/ --with-freetype-config=/opt/garnome/bin/freetype-config (all on one line) - make sure it found expat.h and freetype.h - make && make install - cd ../Xft - apply the following patch to the 'configure.in' file, to change the order in which libraries are found ----- START PATCH (don't include this line) ------ --- configure.in.orig Tue Sep 17 08:02:37 2002 +++ configure.in Mon Sep 16 21:56:35 2002 @@ -178,9 +178,9 @@ esac saved_LIBS="$LIBS" -LIBS="$LIBS $FREETYPE_LIBS" +LIBS="$FREETYPE_LIBS $LIBS" saved_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS" +CPPFLAGS="$FREETYPE_CFLAGS $CPPFLAGS" AC_CHECK_HEADERS(freetype/freetype.h) case "$ac_cv_header_freetype_freetype_h" in ----- END PATCH (don't include this line) ----- - ./configure --prefix=/opt/garnome --with-fontconfig-config=/opt/garnome/bin/fontconfig-config --with-fontconfig-lib=/opt/garnome/lib/ --with-fontconfig-includes=/opt/garnome/include/ --with-freetype-includes=/opt/garnome/include/freetype2 --with-freetype-lib=/opt/garnome/lib/ --with-freetype-config=/opt/garnome/bin/freetype-config - make && make install So far everything is installed into the same directory as gnome2 is installed. The following package however is installed in the X11-directory on your system. This shouldn't cause any problems, but I needed to mention this. - cd ../Xrender - xmkmf -a - make && make install Now we are almost ready. Only pango doesn't know about fontconfig yet. The version installed with garnome doesn't support fontconfig. But the attached Makefile for your garnome-pango directory downloads a beta of pango with support for fontconfig. I also attached the checksums file. - cp Makefile /usr/src/garnome-0.16.2/gnome/pango - cp checksum /usr/src/garnome-0.16.2/gnome/pango - cd /usr/src/garnome-0.16.2/gnome/pango - make install Now only gtk needs to be recompiled, it already has support for fontconfig, so no new version is needed. - cd ../gtk+ - make clean - make install Alright... now you should have a spiffy gnome2 using fontconfig. I suggest to reboot or otherwise make sure all gnome2 libraries are unloaded. I normally do this by going into runlevel 3 (telinit 3), killing any processes still runnning. And then going back to runlevel 5 (telinit 5). This is enough for me, since I use gdm2. When you use gdm2, and click on the 'language'-button you might be able to see chinese/japanese or whatever correctly rendered. At least I see them. And if you don't you either haven't got the right fonts installed or fontconfig didn't find them. You can add more font-directories in /opt/garnom/etc/fonts/fonts.conf. I attached my version of the file. But this probably has a few directories, that actually shouldn't be included. If you have any problems with the above walk-through just let me know. Have fun, -A.
Attachment:
freetype-garball.tar.gz
Description: GNU Zip compressed data
GARNAME = pango GARVERSION = 1.1.1 CATEGORIES = gnome DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz MASTER_SITES = ftp://ftp.gtk.org/pub/gtk/v2.1/ LIBDEPS = gnome/glib misc/freetype DESCRIPTION = pango define BLURB #FIXME: blurb goes here endef CONFIGURE_SCRIPTS = $(WORKSRC)/configure BUILD_SCRIPTS = $(WORKSRC)/Makefile INSTALL_SCRIPTS = $(WORKSRC)/Makefile CONFIGURE_ARGS = $(DIRPATHS) --without-qt include ../category.mk
1922d1c1a59644d7a16250c8f4710e5b download/pango-1.1.1.tar.gz
<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <!-- /etc/fonts.conf file to configure system font access --> <fontconfig> <!-- Font directory list configured on Sun Aug 4 21:33:34 EEST 2002 --> <dir>/usr/share/fonts</dir> <dir>/usr/X11R6/lib/X11/fonts</dir> <dir>/usr/X11R6/lib/X11/fonts/Type1</dir> <dir>/usr/X11R6/lib/X11/fonts/TTF</dir> <dir>/usr/share/fonts/default/Type1</dir> <dir>/usr/share/fonts/ttf/armenian</dir> <dir>/usr/share/fonts/ttf/big5</dir> <dir>/usr/share/fonts/ttf/decoratives</dir> <dir>/usr/share/fonts/ttf/gb2312</dir> <dir>/usr/share/fonts/ttf/japanese</dir> <dir>/usr/share/fonts/ttf/korean</dir> <dir>/usr/share/fonts/ttf/monotype</dir> <dir>/usr/share/fonts/ttf/thai</dir> <dir>/usr/share/fonts/ttf/western</dir> <dir>/usr/share/fonts/ttf/intlfonts</dir> <dir>/usr/share/fonts/ttf/other</dir> <dir>/usr/share/fonts/type1/baltic</dir> <dir>/usr/share/fonts/type1/default</dir> <dir>/usr/share/fonts/type1/elmar</dir> <dir>/usr/share/fonts/type1/arabic24</dir> <dir>/usr/share/fonts/type1/cu</dir> <dir>/usr/share/fonts/type1/other</dir> <dir>/usr/share/fonts/type1/indic</dir> <dir>/usr/share/fonts/type1/intlfonts/Asian</dir> <dir>/usr/share/fonts/type1/intlfonts/Chinese</dir> <dir>/usr/share/fonts/type1/intlfonts/Chinese.BIG</dir> <dir>/usr/share/fonts/type1/intlfonts/Chinese.X</dir> <dir>/usr/share/fonts/type1/intlfonts/Ethiopic</dir> <dir>/usr/share/fonts/type1/intlfonts/European</dir> <dir>/usr/share/fonts/type1/intlfonts/European.BIG</dir> <dir>/usr/share/fonts/type1/intlfonts/Japanese</dir> <dir>/usr/share/fonts/type1/intlfonts/Japanese.BIG</dir> <dir>/usr/share/fonts/type1/intlfonts/Japanese.X</dir> <dir>/usr/share/fonts/type1/intlfonts/Korean.X</dir> <dir>/usr/share/fonts/type1/intlfonts/Misc</dir> <dir>/usr/share/fonts/type1/intlfonts/Type1</dir> <dir>/usr/local/j2re1.4/lib/fonts</dir> <dir>/usr/share/yudit/fonts</dir> <dir>/usr/lib/mures/images</dir> <dir>/usr/share/eel/fonts/urw</dir> <!-- <dir>/usr/share/texmf/fonts/type1/adobe/utopia</dir> <dir>/usr/share/texmf/fonts/type1/bitstrea/charter</dir> <dir>/usr/share/texmf/fonts/type1/bluesky/cm</dir> <dir>/usr/share/texmf/fonts/type1/bluesky/cmextra</dir> <dir>/usr/share/texmf/fonts/type1/bluesky/euler</dir> <dir>/usr/share/texmf/fonts/type1/bluesky/symbols</dir> <dir>/usr/share/texmf/fonts/type1/hoekwater/context</dir> <dir>/usr/share/texmf/fonts/type1/hoekwater/mflogo</dir> <dir>/usr/share/texmf/fonts/type1/hoekwater/misc</dir> <dir>/usr/share/texmf/fonts/type1/hoekwater/rsfs</dir> <dir>/usr/share/texmf/fonts/type1/hoekwater/stmaryrd</dir> <dir>/usr/share/texmf/fonts/type1/hoekwater/wasy</dir> <dir>/usr/share/texmf/fonts/type1/public/belleek</dir> <dir>/usr/share/texmf/fonts/type1/public/cmcyr</dir> <dir>/usr/share/texmf/fonts/type1/public/marvosym</dir> <dir>/usr/share/texmf/fonts/type1/public/omega</dir> <dir>/usr/share/texmf/fonts/type1/public/pazo</dir> <dir>/usr/share/texmf/fonts/type1/public/pl</dir> <dir>/usr/share/texmf/fonts/type1/public/px</dir> <dir>/usr/share/texmf/fonts/type1/public/tx</dir> <dir>/usr/share/texmf/fonts/type1/public/xypic</dir> <dir>/usr/share/texmf/fonts/type1/urw/avantgar</dir> <dir>/usr/share/texmf/fonts/type1/urw/bookman</dir> <dir>/usr/share/texmf/fonts/type1/urw/courier</dir> <dir>/usr/share/texmf/fonts/type1/urw/helvetic</dir> <dir>/usr/share/texmf/fonts/type1/urw/ncntrsbk</dir> <dir>/usr/share/texmf/fonts/type1/urw/palatino</dir> <dir>/usr/share/texmf/fonts/type1/urw/symbol</dir> <dir>/usr/share/texmf/fonts/type1/urw/times</dir> <dir>/usr/share/texmf/fonts/type1/urw/zapfchan</dir> <dir>/usr/share/libwmf/fonts</dir> --> <!-- Accept deprecated 'mono' alias, replacing it with 'monospace' --> <match target="pattern"> <test qual="any" name="family"> <string>mono</string> </test> <edit name="family" mode="assign"> <string>monospace</string> </edit> </match> <!-- Accept deprecated 'sans' alias, replacing it with 'sans-serif' --> <match target="pattern"> <test qual="any" name="family"> <string>sans</string> </test> <edit name="family" mode="assign"> <string>sans-serif</string> </edit> </match> <!-- Mark common families with their generics so we'll get something reasonable --> <!-- Serif faces --> <alias> <family>Times</family> <family>Times New Roman</family> <family>Nimbus Roman No9 L</family> <family>Luxi Serif</family> <family>Kochi Mincho</family> <family>AR PL SungtiL GB</family> <family>AR PL Mingti2L Big5</family> <family>Baekmuk Batang</family> <default><family>serif</family></default> </alias> <!-- Sans-serif faces --> <alias> <family>Helvetica</family> <family>Arial</family> <family>Verdana</family> <family>Nimbus Sans L</family> <family>Luxi Sans</family> <family>Kochi Gothic</family> <family>AR PL KaitiM GB</family> <family>AR PL KaitiM Big5</family> <family>Baekmuk Dotum</family> <family>SimSun</family> <default><family>sans-serif</family></default> </alias> <!-- Monospace faces --> <alias> <family>Courier</family> <family>Courier New</family> <family>Andale Mono</family> <family>Luxi Mono</family> <family>Nimbus Mono L</family> <family>NSimSun</family> <default><family>monospace</family></default> </alias> <!-- If the font still has no generic name, add sans-serif --> <match target="pattern"> <test qual="all" name="family" compare="not_eq"> <string>sans-serif</string> </test> <test qual="all" name="family" compare="not_eq"> <string>serif</string> </test> <test qual="all" name="family" compare="not_eq"> <string>monospace</string> </test> <edit name="family" mode="append_last"> <string>sans-serif</string> </edit> </match> <!-- Load per-user customization file --> <include ignore_missing="yes">~/.fonts.conf</include> <!-- Alias well known font names to available TrueType fonts --> <alias> <family>Times</family> <accept><family>Times New Roman</family></accept> </alias> <alias> <family>Helvetica</family> <accept><family>Verdana</family></accept> </alias> <alias> <family>Arial</family> <accept><family>Verdana</family></accept> </alias> <alias> <family>Courier</family> <accept><family>Courier New</family></accept> </alias> <!-- Provide required aliases for standard names --> <alias> <family>serif</family> <prefer> <family>Times New Roman</family> <family>Nimbus Roman No9 L</family> <family>Luxi Serif</family> <family>Times</family> <family>Kochi Mincho</family> <family>AR PL SungtiL GB</family> <family>AR PL Mingti2L Big5</family> <family>Baekmuk Batang</family> </prefer> </alias> <alias> <family>sans-serif</family> <prefer> <family>Verdana</family> <family>Nimbus Sans L</family> <family>Luxi Sans</family> <family>Arial</family> <family>Helvetica</family> <family>Kochi Gothic</family> <family>AR PL KaitiM GB</family> <family>AR PL KaitiM Big5</family> <family>Baekmuk Dotum</family> <family>SimSun</family> </prefer> </alias> <alias> <family>monospace</family> <prefer> <family>Andale Mono</family> <family>Courier New</family> <family>Luxi Mono</family> <family>Nimbus Mono L</family> <family>Kochi Gothic</family> <family>AR PL KaitiM GB</family> <family>Baekmuk Dotum</family> </prefer> </alias> <!-- Artificial oblique for fonts without an italic or oblique version --> <match target="font"> <!-- check to see if the font is roman --> <test qual="first" name="slant"> <const>roman</const> </test> <!-- check to see if the pattern requested non-roman --> <test qual="not_first" name="slant" compare="not_eq"> <const>roman</const> </test> <!-- multiply the matrix to slant the font --> <edit name="matrix" mode="assign"> <times> <name>matrix</name> <matrix><double>1</double><double>.2</double> <double>0</double><double>1</double> </matrix> </times> </edit> <!-- pretend the font is oblique now --> <edit name="slant" mode="assign"> <const>oblique</const> </edit> </match> <!-- Lets do some sub-pixel rendering --> <match target="font"> <edit name="rgba" mode="assign"><const>rgb</const></edit> </match> <config> <!-- These are the default Unicode chars that are expected to be blank in fonts. All other blank chars are assumed to be broken and won't appear in the resulting charsets --> <blank> <int>0x20</int> <!-- space --> <int>0xa0</int> <!-- nsbp --> <int>0x2000</int> <!-- general punctuation spaces --> <int>0x2001</int> <int>0x2002</int> <int>0x2003</int> <int>0x2004</int> <int>0x2005</int> <int>0x2005</int> <int>0x2006</int> <int>0x2007</int> <int>0x2008</int> <int>0x2009</int> <int>0x200a</int> <int>0x200b</int> <int>0x3000</int> <!-- CJK space --> </blank> <!-- Rescan configuration every 30 seconds when FcFontSetList is called --> <rescan> <int>30</int> </rescan> </config> </fontconfig>