Google

background="caolan/pics/weave.jpg">

libwmf

Index to Documentation

Frequently Asked Questions

  1. Fonts
    1. How come there are only 13 fonts?
    2. So, how do I add more fonts?
    3. I don't understand XML. Isn't there an easy way to do this?
    4. What types of font are supported?

  1. Fonts
    1. How come there are only 13 fonts?

      Postscript has 13 standard fonts (or only four, depending on your perspective): Helvetica (optionally bold and/or italic), Times (optionally bold and/or italic), Courier (optionally bold and/or italic), and Symbol. The decision was taken to support these 13 fonts for all outputs from libwmf2, but also to provide mechanisms for adding other fonts.

    2. So, how do I add more fonts?

      RedHat Linux systems, and probably other RPM-based distributions as well, have a `fontmap' file in /usr/share/fonts which lists a large number fonts. libwmf has a mechanism for reading files that have this XML format. In fact, libwmf looks for two such files, a system fontmap and a non-system (or `xtra') fontmap, but only if asked to!

      If you use wmf2x, for example, with the command line option --wmf-sys-fonts then libwmf will search for fonts in the system fontmap file. Similarly, if you specify the command line option --wmf-xtra-fonts then libwmf will search for fonts in the non-system fontmap file. The default locations of these files is specified at compilation time, but can also be specified at run time through the use of the command line options --wmf-sys-fontmap=fontmap and --wmf-xtra-fontmap=fontmap.

      Warning:If you use non-system fonts with wmf2eps, ghostscript (or whatever postscript interpreter you use) may not be able to find all the fonts; the problem is even worse if you want other people to be able to view the image, because only the 13 standard fonts are guaranteed to be supported.

    3. I don't understand XML. Isn't there an easy way to do this?

      There is a utility called libwmf-fontmap that hunts through directories for fonts and creates a custom fontmap file. Just type:

      libwmf-fontmap --map=fontmap directory1 directory2 ...

    4. What types of font are supported?

      libwmf uses freetype (2) for loading fonts and therefore supports all fonts that freetype knows, this includes postscript fonts (font.afm & font.pfa pairs or font.afm & font.pfb pairs) and true-type fonts (font.ttf) and many others.