Togan Muftuoglu
* Mike FABIAN;
on 19 Jan, 2003 wrote: [...] I'll extend the /sbin/conf.d/SuSEconfig.fonts script to generate the /usr/share/ghostscript/fonts/fonts.{scale,dir} files automatically using 'mkfontscale' for SuSE Linux >= 8.2.
Great, so it'll work out of the box :-)
I improved /sbin/conf.d/SuSEconfig.fonts now to do that and a few
more things.
If you like you can test it, the new scripts are here:
http://www.suse.de/~mfabian/misc/SuSEconfig.fonts/SuSEconfig.fonts
http://www.suse.de/~mfabian/misc/SuSEconfig.fonts/fonts-config*
http://www.suse.de/~mfabian/misc/SuSEconfig.fonts/fonts-config.1.gz
I tested them on SuSE Linux 8.1 and on the current beta, they might work
for older versions as well but I haven't tried.
To use the new scripts, copy the above 3 files to
/sbin/conf.d/SuSEconfig.fonts
/usr/sbin/fonts-config
/usr/share/man/man1/fonts-config.1.gz
and call
/usr/sbin/fonts-config --force
as root.
Actually /sbin/conf.d/SuSEconfig.fonts itself does almost nothing now.
I found it too difficult to extend the bash script SuSEconfig.fonts,
therefore I removed almost everything from SuSEconfig.fonts and made
it just call the perl-script /usr/sbin/fonts-config which does the
real work.
Here's the man-page of the new fonts-config script:
FONTS-CONFIG(1) FONTS-CONFIG(1)
NAME
fonts-config - configures installed fonts for use with
X11.
SYNOPSIS
fonts-config [OPTION]...
OPTIONS
-f, --force
Force the update of all generated files even if it
appears to be unnecessary according to the time
stamps.
-q, --quiet>
Work silently, unless an error occurs.
-v, --verbose
Print some progress messages to standard output.
-d, --debug
Print a lot of debugging messages to standard output.
DESCRIPTION
Configures installed fonts for use with X11. Basically it
does the following things:
call fc-cache
creates an index of FreeType font files in a directory
for use with client side font rendering via libXft,
see fc-cache(1).
call cidfont-x11-config
cidfont-x11-config is another little perl script which
configures CID-keyed fonts for use with X11, see cid
font-x11-config(1).
creates fonts.scale and fonts.dir files
To find the list of directories currently used for
server side fonts, /etc/X11/XF86Config is parsed and
merged with a hardcoded list of directories. If the
font server xfs is running, /etc/X11/fs/config is also
parsed and the list of directories found there is
merged as well.
In each directory from this list, first of all a
fonts.scale file is created by calling mkfontscale.
Then, the entries found in the fonts.scale file are
merged with the entries from all fonts.scale.* files.
fonts.scale.* files may be supplied by rpm-packages or
manually added by the user to override or amend the
entries created automatically by mkfontscale. Entries
in a fonts.scale.* file have higher priority than
entries automatically created by mkfontscale. All
entries generated automatically by mkfontscale for a
certain font file are discarded if any fonts.scale.*
file contains an entry for the same font file.
If the xtt module is configured to load in
/etc/X11/XF86Config, additional entries may be created
to make use of the artificial bold and italic features
of xtt. The time stamp of /etc/X11/XF86Config is not
checked, i.e. you have to use fonts-config --force
after editing /etc/X11/XF86Config to switch between
the xtt and freetype modules.
After the final list of entries has been written back
to fonts.scale, mkfontdir is called.
Usually fonts-config is called automatically via SuSEcon
fig (SuSEconfig --module fonts), which is usually automat
ically called by YaST2. But you can also execute fonts-
config directly, which is mainly useful to debug it.
AUTHOR
Mike FABIAN