1 --- t1lib-1.3.1.orig/debian/t1libconfig.8
2 +++ t1lib-1.3.1/debian/t1libconfig.8
7 +\- create the t1lib.config and FontDataBase files for t1lib
11 +.BR \-v\fP, \fB\-\-version
14 +.BR \-h\fP, \fB\-\-help
23 +scans a list of directories for Type 1 fonts and font metric files,
24 +and generates a configuration file and font database file for the
26 +rasterizer library accordingly. By default, it looks in all
27 +subdirectories of /usr/X11R6/lib/X11/fonts, and in
28 +/usr/lib/ghostscript. Extra directories to search may be specified on
29 +the command line. The
31 +script tries not to scan the same directory twice (this is, however,
32 +not foolproof, since /usr/X11R6/lib/X11/fonts and /usr/lib/X11/fonts
33 +typically point to the same directory on GNU/Linux systems).
36 +.BR \-v\fP, \fB\-\-version
41 +.BR \-h\fP, \fB\-\-help
42 +Print help about usage and exit.
45 +Force the generation of new configuration files even if these files
46 +already exist on the system.
49 +.B /etc/t1lib/t1lib.config
50 +Contains configuration information for t1lib, including
51 +colon-separated lists of paths to Type 1 font files and font metrics
52 +files, and the location of the default font database file
54 +.B /etc/t1lib/FontDataBase
55 +Contains a list of the names of Type 1 font files to be used by t1lib.
57 +David Huggins-Daines <dhd@debian.org>
61 --- t1lib-1.3.1.orig/debian/t1libconfig
62 +++ t1lib-1.3.1/debian/t1libconfig
66 +# to test POSIX-correctness, change hash-bang to /bin/bash and uncomment
67 +# the following line:
71 +# Very simple configuration script for t1lib. Checks a couple of
72 +# directories that might contain fonts, and if they exist, adds
73 +# anything ending in .pfa or pfb to the font database. A few things
74 +# borrowed from paperconfig, (C) 1996, Yves Arrouye
75 +# <arrouye@debian.org>
77 +# note that this creates the "minimal" font database accepted by t1lib,
78 +# and doesn't look in every possible place for fonts. It is mostly
79 +# provided so that xglyph will work out of the box...
81 +# Written by David Huggins-Daines <dhd@debian.org>
92 + echo "sage: `basename $0` [ -v, --version ] [ -h, --help ] [ --force ]"
93 + echo " [ fontdirs... ]"
99 +Options: -v, --verbose print version information and exit
100 + -h, --help print this help and exit
101 + --force force configuration
110 +x11fontdirs="$(find /usr/X11R6/lib/X11/fonts -type d -printf "%p " || true) $(find /usr/share/fonts -type d -printf "%p " || true)"
111 +fontdirs="/usr/lib/ghostscript/fonts $x11fontdirs"
112 +conffile=/etc/t1lib/t1lib.config
114 +dbase=/etc/t1lib/FontDatabase
115 +temp=/etc/t1lib/FontDatabase.tmp
123 + echo "`basename $0` version $version" \
124 + "by David Huggins-Daines <dhd@debian.org>"
134 + # hairy way to remove a trailing backslash (should use perl)
135 + pat=`expr $1 : "\(.*\)\/\$" || echo $1`
136 + # hairier way to find a string anywhere in another string
137 + # should really use perl.
138 + if ! grep $pat <<EOF >/dev/null 2>&1
142 + fontdirs="$fontdirs $1"
149 +# We presume that if the database exists, then so does the
150 +# configuration file. Hopefully this won't break anything.
152 +if [ $force -eq 1 ] || [ ! -e $dbase ]; then
156 + mkdir -p $confdir || true
158 + echo -n "Searching for Type 1 fonts and AFM files..."
162 + if [ -d $i ] && ls $i/*.pf[ab] > /dev/null 2>&1; then
163 + if [ -n "$fontpath" ]; then
164 + fontpath="$fontpath:$i"
169 + if ls $i/*.afm > /dev/null 2>&1; then
170 + if [ -n "$afmpath" ]; then
171 + afmpath="$afmpath:$i"
176 + # get a listing of all the fonts in each dir
177 + find $i -name *.pf[ab] -maxdepth 1 -printf '%f\n' >> $temp
180 + if [ -z "$fontpath" ]; then
183 +No Type 1 fonts were found in the expected locations.
184 +If you want t1lib to be aware of your fonts, you should run
185 +/usr/sbin/t1libconfig with the names of your local font directories as
186 +arguments, or you should edit the /etc/t1lib/FontDatabase file manually.
187 +See the FontDatabase(5) manual page for more information.
189 +Press [return] to continue.
195 + echo -n "Building font database..."
196 + fontcount=`wc -l $temp || true`
197 + echo $fontcount > $dbase
198 + cat $temp >> $dbase
203 + # now set the paths in the config file
204 + cat <<EOF >$conffile
205 +t1lib.config - global configuration file for t1lib.
206 +It was created automatically on `date`
207 +by the t1libconfig script.
209 +Run /usr/sbin/t1libconfig --force to rebuild it.
217 + echo "Configuration and font database files already exist."
218 + echo "Run /usr/sbin/t1libconfig --force to rebuild them."