libwmf
Index to Documentation
html/index.html
Doxygen documentation for libwmf-0.2.1 & later
tutapi.html
libwmf-0.2.0 Tutorial 1: The API
tutipa.html
libwmf-0.2.0 Tutorial 2: The IPA
dlayer.html
libwmf-0.2.0 Device Layer Reference
caolan/index.html
The Windows Metafile (wmf) Operand Documentation
, by Caol?n McNamara
gd.html
gd 2.0.1 Documentation
, from Boutell.Com
Frequently Asked Questions
#fonts
Fonts
#font13
How come there are only 13 fonts?
#fontmore
So, how do I add more fonts?
#fontmapper
I don't understand XML. Isn't there an easy way to do this?
#fonttype
What types of font are supported?
Fonts
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.
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.
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
...
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.
