The K Desktop Environment

Next Previous Table of Contents

5. Frequently Asked Questions

5.1 What is an encoding/extended encoding?

An encoding is what maps ASCII/Unicode values onto glyphs (the pictures of the characters you see on screen). For example, the letter 'A' is ASCII 65 - which in most fonts will map onto the glyph for character 'A'. This is an encoding. There are standard encodings such as Latin1 (also known as iso8859-1), etc, which X11 knows about by default. (Latin1 is used in most western-European countries).

XFree86 V4, and the X font server supplied with RedHat, allow the use of extended, or extra, encoding schemes not built-in into the the X font server. An example of one of these is 'cp1252' (called microsoft-cp1252 in the KFontinst 'Configure System' dialogue). This is very similar to Latin1, but where Latin1 has some empty spaces (where no characters are defined), cp1252 maps such characters as smart quotes, the Euro symbol, etc. For X11 to use these extra encodings it must support the ability to use the .enc files that are supplied with KFontinst. These files have been taken from the xfsft package, so If your X font server is xfsft based (such as the RedHat server, or XFree86 v4) then this shouldn't be a problem. (The xfstt TrueType server, on the other hand, has it's own file format for these, and therefore does not support .enc files).

5.2 How do I know if Ghostscript supports TrueType?

The only way to know, is to create a PS file that mentions a TrueType font, configure ghostscript's Fontmap to use this .ttf file (preferably via KFontinst), and use something like 'gv' to test the output. If ghotscript crashes, or you get a different font on the output - you probably don't have TrueType enabled. (There may be another way to test this, I don't know...)

5.3 KFontinst complains that it can't configure X (fonts.dir/fonts.scale)

If you have selected an encoding, other than "Unicode", then KFontinst passes a '-e' option to mkfontdir. It is possible that your mkfontdir does not support this option. On my RedHat 6 system, the mkfontdir that was supplied understood this option. Basically it has to do with how the X font server knows about the extended encoding files. If your mkfontdir doesn't like the '-e' then it is very likely that your system is not using an xfsft base font server - therefore you cannot use the extended encodings. If you know that you X font server is xfsft based, then I suggest you download a newer version of mkfontdir.

5.4 I try to fix a TTF's PS names but get errors

The following error strings are returned when fixing a TTFs' PS names:

  1. "No TTF header" or "Error with TTF file format" If this occurs, basically it probably means your font is not a TrueType font - or it is corrupt.
  2. "No 'postscript' table" The TTF does not caontain a list of Postscript names - this is very bad, and means Ghostscript probably won't be able to use your font.
  3. "No 'character map' table" This will occur if the font is a Symbol font - in which case ignore, as these fonts will have differnent name tables. Otherwise, your font is probably corrupt.
  4. "Uses MAC standard table" The font is encoded with the standard 256 Macintosh character set - in which case their will be no incorrect names to fix.
  5. "Font does not contain any glyphs to remap" This will occur for font's that don't actually contain the glyphs (i.e. pictorial representation of a character) that need to be fixed. At present (KFontInst v0.8), only the "Euro" symbol is checked, and a lot of fonts don't contain this.
  6. "PS name maping file not found, or empty" This indicates that KFontinst couldn't find the file psnames in it's install directory - this means your installtion may be corrupt.

5.5 What are AFM files?

AFM (Adobe Font Metrics) are files that contain a detailed description of the metrics of a font and it's characters. The metrics are used to obtain the width, height, etc. of a character. This is needed to produce correct printed output - which is why they are needed by StarOffice and AbiWord.

Creating these .afm files can be very slow, therefore if you re-configure your system - .afm files are only created if they do not already exist. Because of this, if you see any of the warnings in the next section, you will not see them the next time you do a configure - as the .afm files will already have been created.

5.6 When installing a Type 1 font I get some strange output on the console

To create AFM files for any Type1 fonts which did not have an associated .afm file upon installation, KFontinst uses a Postscript script called 'pf2afm.ps'. This will sometimes produce the following warnings:

  1. "pfm file not found -- ignored" pf2am.ps will try to look for a .pfm file associated with the Type1 font to help it create the .afm files, and will print this if it can't find (usually it can't). Just ignore this warning, .afm files are still successfully produced.
  2. "Encoding array contains name(s) absent from CharStrings dictionary" Again, this can be ignored.

5.7 When configuring Ghostscript or StarOffice, I get the error "Could not merge files"

When configuring Ghostscript, or StarOffice, KFontinst creates some temporary files which it tries to merge with the real files. (For instance - with Ghostscript a /tmp/kfontinstFontmap is created, which is then merged with the real "Fontmap" file). This error is produced if the files could not be mergerd. Usually this is because the Settings dialog has not been filled in with the correct information - i.e. Ghostscript Fontmap file, or StarOffice xp3 directory.

Next Previous Table of Contents