>>>> "Hrvoje" == Hrvoje Niksic
<hniksic(a)xemacs.org> writes:
;; Really, we should get rid of these font.el dependencies... They
;; are still presenting a problem with dumping the faces (font.el is
;; too bloated for us to dump).
So that _was_ you. I always thought so. Heh. I wish you luck. X
fonts defeated Jamie, I suspect it will give you headaches, too. And
then add MSFT et al on top?! ;-)
How about the fontconfig API (used by Xft, but not tied to Xft or
freetype)? Basically, it provides a C-level API which stores the
various XLFD properties (including but not limited to the ones you can
if you're lucky parse from a 14-hyphen name) in well-defined slots.
If you have a better interface (such as the one used by freetype),
then those properties automatically get stored in fontconfig slots.
If not, fontconfig will try to parse XLFD names from fonts.dir and
fonts.alias. It shouldn't be hard to adapt to snarf MSFT properties,
too. Then there would be a canonical way to deal with this, instead
of the mess we have in font.el and *face*.el
What I'm thinking about is replacing our current "the name is the
font" interface with a more sensible interface based on fontconfig,
right down to the font-specifier component. Then all the Lisp
functions you want are trivial wrappers around the fontconfig API.
These wrappers are already mostly written (but misnamed as an
interface to Xft) in the "Xft patch reloaded" thread on xemacs-patches.
If you don't know fontconfig, I'll be posting a texinfo version of the
docs shortly for use of the Xft experimenters.
Note that fontconfig does not (AFAICT) depend on having anything built
in to X. Although it is designed to be used with Xft, so there is a
whole sub-API for finding out what fonts are available on the system,
you _can_ ignore that, and simply use it as a standard way to store
font metadata. (It actually looks a fair amount like font.el as an
API, but I don't know how much "bloat" it would add to XEmacs.)
> That's exactly what I wanted. If the users can't get at
it,
> it's not properly supported.
Hrvoje> I guess I didn't realize what you meant by supported. For
Hrvoje> example, a user cannot type `M-x make-extent', or `M-x
Hrvoje> make-face' yet both interfaces are supported for my
Hrvoje> definitions of the word.
I was being a little unfair. I'm using "available to the users" as a
heuristic for the kinds of reasons you didn't use the GNU names for
the similar functions in XEmacs -- it's incomplete, a hack, doesn't
really address the needs (of Mule users, in my case).
--
Institute of Policy and Planning Sciences
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.