On Sep 28, 2005, at 4:30 AM, YAMAMOTO Mitsuharu wrote:
On 25 Sep 2005 10:20:31 -0400, Adrian Robert
<[EMAIL PROTECTED]> said:
Even in X11, while XLFD is needed at the lowest level to interact
with the windowing system, is it really necessary to expose the user
to it? In the old days when emacs-X11 was first developed, X11
users were used to specifying fonts in ...-*-*-*-*-... fashion.
Nowadays, most apps shield them from this. Thus, maybe it's
reasonable to develop a new emacs font specification style that's
simpler, and use this even in the face code until the lowest level
where interaction w/the window system takes place?
I'm not against the introduction of a new font specification style,
but I think it is mainly for developers and power-users. Emacs
already has a mechanism that enables users to specify fonts in a
simpler way at the face level.
You're right.. But the population of "power users" in this case for
whatever reason seems fairly large (just subjective impression), and
the requirement to learn XLFD (to compose a fontset, or whatever
else) and partake of the pleasures of asterisk-counting seems onerous.
In addition, I've been integrating the Cocoa port's font handling
with xfaces.c, and can say it's onerous for developers. All of these
structures and functions concerned with creating, parsing, and
storing the XLFD representation. And you can't avoid using it in a
port (at least, all of my attempts to work around it so far have
failed), so each platform gets to join in the fun. Thus you find the
various functions for faking (and unfaking) them under the two (now
three) non-X platforms.
XLFD should be removed from non-window-system-specific code and
replaced with a simple struct containing the same information. In
fact, given what's in font_info and common to "XFontStruct" on every
platform right now, this would amount to adding a couple of fields,
if that. The only advantage of using a string representation I've
seen so far is doing the regexp match in x_list_fonts. But this is a
false economy -- the extra code to do explicit field-by-field
matching on a struct would be trivial, and far smaller than all of
the XLFD translation and manipulation machinery now in place. And it
would be more efficient and reside completely in common, non-window-
system-specific code.
Be that as it may, the people who write the code get to decide how it
is, and I don't have the time / energy to try this rewrite now. The
Cocoa port will just live with it along with everyone else, though if
it gets too ugly I might revisit this choice..
BTW, I don't want to sound too down on xfaces.c -- both it and the
display interface code in general are vast improvements over emacs-20
in terms of sharing common code and simplifying what the platform-
specific part has to do. (Not to mention the enhanced
functionality.) Kudos to Gerd Moellmann and everyone else responsible!
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel