Next Previous Table of Contents
KFontinst should be run as root
as it needs to alter system files, and create files
within system directories.
Another way is to chmod a+s kfontinst
so that the program is run with root privilages,
although I don't recommend this as it means anyone can play about with the system files.
Before installing, or uninstalling fonts, make sure that the directory, and other, settings
are OK for your system. To do this open the Settings
dialog by selecting
Settings...
from the File
menu. This dialog contains the following elements...
X11 Fonts Directory:
This should be the complete path to the X11 font directory, as described in
section 2.1.
Ghostscript Fontmap File:
This should be the "Fontmap" file you want KFontinst to modify. This will
usually be one of the following (note the 5.50 represents the Ghostscript version, and may be different on your system):
/usr/share/ghostscript/5.50/Fontmap
/usr/share/ghostscript/5.50/lib/Fontmap
/usr/share/ghostscript/5.50/Fontmap.GS
(This is the file on Mandrake 7.2)/usr/share/ghostscript/5.50/lib/Fontmap.GS
StarOffice
Check this box if you want KFontinst to configure StarOffice.
xp3 directory:
This should be the xp3
sub directory of StarOffice.
For SO <= 5.1a this will be <StarOfficeDir>/xp3
, and for SO >= 5.2 it will be
<StarOfficeDir>/share/xp3
. See section 2.3 for more details.To uninstall:
This option allows you to specify how fonts will be uninstalled.Install:
This section details the install options.
Process AFMs:
Select this option to force KFontinst to automatically process a font's associated .afm file
upon installing the font. (This will mainly affect Type1 fonts, as TrueType fonts don't usually have an associated .afm)
See section 3.5 for more details.Fix TTF PS names:
Select this option to automatically check, and fix, any TrueType font's whose
Postscript names table is incorrect.
See section 3.7 for more details.Command to restart X font server:
Here you can supply a command that can be used to restart the font server.
You will be prompted to perform this after a successful reconfiguration of X. For RedHat & Mandrake systems, this command will usually be
/etc/rc.d/init.d/xfs restart
Preview string:
This section allows you to choose the preview string (the text that appears in the main window).
Default (AaBbCcDdEe...)
Select this to use the default (which is all 26 english letters - in uppercase, and lowercase -
as well as a few symbols).Custom:
Here you can type in your own string.Change Disk Directory
from the File
menu, or click on the folder icon in the main window.Disk
list.Disk
list and select Install
from the pop-up menu. This will copy the font file to the Install
directory. If a
corresponding .afm file exists for the font, then this .afm file will be copied to font directory as well.Configure System
from the File
menu. (Note you only need to configure the system
after you have finished installing and uninstalling all your fonts - it is not neccessary after
each install/uninstall).
If you install a font with the same
basic filename (i.e. excluding extension) as an already existing one of the other type - then the filename will
be modified to have a _kfi
suffix. e.g.
You install a file caled courbi.pfa
, and you already have courbi.ttf
installed.
courbi.pfa
will be renamed to courbi_kfi.pfa
when it is installed. (This is needed as .afm files
have the same basic name as the font file - and obviously a different .afm file is needed for each font.)
Install
list.
Installed
list and select Uninstall
from the pop-up menu. This will either delete the font file from the Install
directory,
or move it to the Uninstall
directory - depending upon your chosen setting (refer to the Settings
dialog.Configure System
from the File
menu. (Note you only need to configure the system
after you have finished installing and uninstalling all your fonts - it is not neccessary after
each install/uninstall).
As mentioned in section 2.3 / NOTE 2 StarOffice is extremely fussy when it comes to its
font handling. Some fonts will cause it to just crash for no stated reason. Because of this KFontinst gives you the ability
to exclude a font from StarOffice - when you configure your system no entries for excluded fonts will be placed into
X11.PS
, this will then cause StarOffice to ignore the font.
This feature is accessible by right clicking on the installed font list
window. Excluded fonts will have an asterisk (*) placed to the left of the filename. Fonts should be marked for exclusion prior
to configuring your system.
Before excluding a font, please try processing the .afm file (as described in section 3.5) first.
Configure system
from the File
menu. This will
produce a dialog with various options:
X - fonts.dir & fonts.scale
. These must be created so that X knows about your fonts.X - Use XXXX encoding
. X can be configured to perform a remapping of
a fonts internal character mapping on the fly. What happens is that when you try to acces the pictorial
representation (called a `glyph') of say character #123 - X will use the reencoding scheme to actually get the
glyph of character (e.g.) #4321 instead. This allows you to have access to the hundreds of glyphs that fonts
contain. If you select this option, then any fonts that have the ability to use this encoding will be noted as so in
fonts.dir
and fonts.scale
.
Use exclusively
. If this option is selected, then for any fonts that can be reencoded to use
the selected encoding scheme - the entries in fonts.dir
and fonts.scale
will be for this encoding
only (i.e. no other encodings will be listed). This is needed for StarOffice - which seems to always choose iso8859-1 instead
of any other encoding if it is available. Basically if your going to use an extended encoding - then select this option as well.
Force AFM regeneration
. If you have selected a new encoding scheme, then it is possible that your AFM files
may be out of date. Selecting this option will force the AFM creator (if 'Generate AFMs' is selected) to create new AFM files
for TrueType fonts.microsoft-cp1252
is the encoding scheme used in Windoze to access extra characters
(Euro, smart-quotes, etc).AFMs
. AFM (Adobe Font Metric) files are required by AbiWord, StarOffice, and possibly other apps.
afm.pl
perl script, or pf2afm.ps
(included in the archive). These programs can be quite
slow, therefore when configuring the sytem, if a .afm file already
exists for a font then a new one is not created.StarOffice
. To use the fonts with StarOffice, it must obviously be configured. You
will notice that it is not possible to configure StarOffice without configuring X, AFM files, and
Ghostscript - this makes sense as StarOffice can only use the fonts available to X, and they can
only be printed if Ghostscript is configured - plus StarOffice requires a .afm files for
each font file.Ghostscript
. In order to print Ghostscript must know about your fonts - to accomplish this KFontinst
creates a Fontmap.X11
file, and this is placed within your Ghostscript
directory.
If KFontinst complains that it could not configure/create something - this probably means that you do not have write permission on the files/directories that KFontinst needs to create/alter. If this happens then KFontinst will not try to configure any other part. The ordering of configuration/creation is:
Therefore, if Ghostscript cannot be configured, then KFontinst will stop there - no AFM files will be created, and StarOffice will not be configured.
There is no configuration option for AbiWord - as it does not require any setup files to be produced.
As mentioned before, StarOffice is very fussy - especially when it comes to .afm files. When installing a font,
if a .afm file exists in the Disk
directory at install time - then this file is also copied to the
Install
directory, and a .afm file is not created when the system is configured.
(Any .afm files created
by KFontinst will automatically be processed). If you have problems with StarOffice, or any other app,
it could be due to an error in the .afm file. To, hopefully, solve this problem you can select
Process AFM file
from the Installed
list window.
When the system is configured, .afm files are only created if they do not already exist within the X11 fonts directory.
This is because the creation of the .afm files can be very slow. However, this has the problem that if you change the X11
font encoding (see section 3.4) that you want to use then the .afm files will not be updated
to reflect this mapping. To cure this, if you delete the font's .afm file before configuring with a new encoding then a new
.afm file will be created to match this new encoding. If you select some fonts in the installed list, and select the
"Delete AFM file..."
option, then the .afm files for each of the selected fonts shall be deleted (after you have
answered "Yes"
to the displayed message box). Please note - at present, the reencoding of .afm files only
applies to those created for TrueType fonts. Another way around this is to select the Force TrueType Regeneration
option in the Setttings/AFM dialog.
TrueType fonts contain a maping of glyph (pictorial representation of a character) to postscript names. Unfortunately not all
TTF files have the correct names - for example I found that times.ttf
had the Euro glyph mapped to the postscript name
uni20AC
instead of Euro
. This would cause problems with Ghostscript - which would rely upon correct
PS names. Therefore I have provided an option to "fix" the PS names in TTF files. If you select some .ttf
files in
either the installed or disk list, and select the "Fix TTF postscript names..."
option you may "fix" the
postscript name table of a TrueType font. The list of Unicode to glyph names to "fix" is stored in a file called psnames
- which may be found in <KDE Dir>/apps/kfontinst/
. This file has the following format:-
<Unicode value> <Postscript name>
If you find any other incorrectly named values, then please let me know - and I will extend the psnames
file
in the distributed archive.
Next Previous Table of Contents