APPROVE COMMIT 21.5
Based on encouragement on XEmacs Review and private mail from Ben, I'm
merging the current public state of the Xft branch to mainline. The
sjt-xft branch itself is deprecated. I do have some uncommitted work,
but if it is appropriate for that to happen on a branch in the XEmacs
repository, I'll start a new branch with an appropriate name.
The work being merged here is very incomplete, and is basically
restricted to the redisplay aspects. It also adds a public Lisp
interface to fontconfig, but that's not terribly useful to would-be
users of antialiased fonts.
What you get is a robust implementation of Xft-drawn text in frames
(including dialogs), tabs and other new widgets (untested), and the
menubar. The frame text is fully Mule-capable. Because the tabs etc
don't use faces, they only are capable of drawing ISO-8859-1 (I don't
think they can handle other 8-bit Latin sets, even). I believe the
menubar lacks Mule support but that's probably fairly easy to add.
To configure with Xft, use the `--with-Xft' option. This is a "complex"
option, you can enable or disable use of Xft per widget class. If
omitted, `with_xft' defaults to `none'; a bare `--with-xft' defaults
to `all'. For more complex usage, see `./configure --help'.
To build with Xft support, you must have the headers and libraries for
Xft version 2 or later and fontconfig version 2 or later installed.
(The versions given are approximate; version 1 of Xft is definitely
not supported.) The libraries are installed by default for most
modern distributions of X11R6.6 or later. Whether the headers are
installed is distribution-specific; please refer to your documentation
or package manager. For Xft support to be better than painfully slow,
you need an X server with the X Render extension installed.
Fonts currently must be configured by the Options menu (which doesn't
work very well with the huge number of fonts available for Xft, and
not at all for non-Latin fonts), or via X resources. Of course you
can also set them at run time with `set-face-font'. We do not attempt
to shoehorn the Xft font names into XLFD form; you should use the
usual Xft format (eg, "Courier-12" and "Courier-14:Bold"). You do
not
need to specify charsets; this is handled (in a hackish way)
internally. Note that if two fonts' repertoires overlap, they are
disambiguated by order in the specifier. Ie,
(set-face-font 'default "Courier-14" nil nil 'prepend)
(set-face-font 'default "Kochi Gothic-14" nil nil 'prepend)
will display all text in Kochi Gothic, while the reverse order will
display Latin text in Courier and Japanese in Kochi Gothic.
What remains to be done:
* Documentation: I plan to move the user and Lisp API documentation
currently in internals to the User Guide and Lispref before the
release of 21.5.24, which will happen soon (a few days). More
documentation is needed, but that should get people started.
* Known implementation bugs: For some fonts and sizes, redisplay
leaves a row of pixels behind when painting blanks over an area
that formerly contained text. C-l (`recenter') will refresh the
display and get rid of them in most cases.
* Unimplemented:
- non-Latin fonts in widgets
- non-Latin fonts in the Options | Fonts menu
- ways to specify precedence per character for fonts with
overlapping repertoires
- any Customize support at all
Comments welcome, but I'm unlikely to get back to this before the new
year, as several projects (the new GC and Unicode internal, at least)
are likely to be demanding most of my time for beta releases and other
admin scutwork. Please keep those build reports, patches, and reviews
coming!
Steve
Patch omitted; see the xemacs-patches archives.
--
School of Systems and Information Engineering
http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Ask not how you can "do" free software business;
ask what your business can "do for" free software.