You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by "Peter S. Housel" <ho...@acm.org> on 2001/11/12 21:44:27 UTC

[PATCH] Proper use of font encodings for "native" fonts

One of the major annoyances for me as I tried to use FOP has been that
it didn't try very hard to get the encodings of the Symbol and
ZapfDingbats fonts right.  In particular, using the proper Unicode
characters for glyphs in these fonts wasn't possible.

The enclosed patch (against 0.20.2, though it should apply cleanly
against the CVS HEAD version) fixes the encoding mechanism.  It splits
charlist.xml (which only covered WinAnsiEncoding) into two files,
glyphlist.xml (containing the official Adobe Glyph List and Zapf
Dingbats glyph lists), and encodings.xml (containing all of the
standard Adobe encodings).  This forces the build process to do a
relational "join" on the two files to generate CodePointMapping.java,
slowing it down a little bit.

It still uses the WinAnsiEncoding for text fonts because this vector
gives the best coverage.  Building with -Dtextfontencoding=MacRomanEncoding or
-Dtextfontencoding=MacExpertEncoding should work too, and allow a different
subset of the font characters in the native text fonts.  With the addition of
code to output encoding vectors, other encodings (such as CEEncoding) could
be used.

Note that this patch requires that the ant distribution's
"optional.jar" be added to lib.

-Peter S. Housel-  housel@acm.org  http://members.home.com/housel/