QUERY
In the same spirit of communication ... you haven't changed
Lisp_Font_Instances at all, right?
The reason I ask is that I've been thinking a lot about font and face
handling, and I've come to the conclusion that we should internalize
fonts completely. Family, foundry, and other font properties should
become face properties, and we cons up XLFDs or FcPatterns as needed
from a set of standard face properties.
Of course we continue to support platform font names as a (partial)
specification for a face, but we do that by parsing at the Lisp level
to a (partially specified) face. The only platform where this would
be likely to cause problems would be the legacy XLFD notation. Others
like Mac and Windows have a very limited support (at the user level,
anyway) for specifying fonts, while Windows includes things like
strikeout and underlining that we definitely consider face information
as part of the UI for specifying fonts.
Aidan> 1. No longer supporting the registry charset property
Aidan> (which was a regexp to match against X11 registries and
Aidan> encodings) to the same extent.
We just upgraded our system, so I no longer have access to a legacy
X11 installation for Japanese (in fact, all I have now is the base Sun
setup since that server no longer runs X for anything but some
graphical displays of system stats on the console), but our old system
(ie, what we used until July) we had about a dozen different JIS Level
1/Level 2 kanji registries, including 3 (maybe 4) different JIS C 6226
"spellings", and 8 or 9 "spellings" of JIS X 0208. (The problem is
that even today the Japanese government is trying to reduce the number
of "official kanji" while many corporate repertoires are expanding,
albeit very slowly. To give you an idea of how badly the JIS people
need a good fscking, it wasn't until 2000 that all officially
registered personal and place names were finally spellable in JIS
standard kanji!)
There needs to be a way to access the more bizarre spellings of these
registries. Now, doing something like (font-list "-*-jisx0208*-*")
will get the user the relevant names, but is there still a way to
request the font in your scheme? Just give a full registry in the
XLFD I guess?
Aidan> 2.“Stage-2” X11 support; that is, when lookup of a font
Aidan> with the registry "Ethiopic-Unicode" fails, make a
Aidan> device-specific note of that, and try again with the
Aidan> registry "iso10646-1" and Unicode conversion in place.
This isn't stage-2 support, strictly speaking. Stage-2 is searching
through the font repertoires for a font that supports a given
character.
If you want to call this "stage-2" and the repertoire search
"stage-3", that's fine by me, but note that the search by repertoire
is evidently straightforward on Windows (and maybe Mac and Xft), and
that's what is implemented on Windows to the best of my knowledge.
Aidan> 4. Addition of a heuristic to xft_find_charset_font to
Aidan> accept reasonable font values for the fallback Unicode
Aidan> charsets.
Is cruftification of xft_find_charset_font really worth it? We are
going to get rid of the (Mule) charsets Real Soon Now, I devoutly
hope!
Aidan> 2006-08-06 Aidan Kehoe <kehoea(a)parhasard.net>
Aidan> * font-mgr.h:
Aidan> Move some XFT debug macros here from objects-x.c.
If you agree that's right, please just do it if you can partial commit
conveniently (if not, tell me and I'll do it). Don't forget to nuke
the now-irrelevant comment recommending doing so! :-)
Aidan> registry and encoding, _then_ call
Aidan> XListFonts. Eliminates calling XListFonts on a pattern of
Aidan> "*", which is nice, because the huge IPC necessary to parse
Aidan> that was a problem.
I think this analysis is incorrect. On both Linux (256MB, 450MHz PII)
and my Mac (1GB, 1GHz G4) the time to run is about 1 second, quite
comparable to the time required to run "xlsfonts | wc -l" from the
command line.
Not a complaint against this patch, obviously, but what it suggests to
me is that the regexp code is either fundamentally REALLY DAMN SLOW or
that the compiled regexp caching is broken, because it takes about 4
seconds for me to run
(let ((fonts nil))
(mapcar (lambda (font)
(when (string-match "^-.*jisx0208.1990-0$" font)
(push font fonts)))
(font-list "*"))
;; minimize read-eval-print i/o
(car fonts))
It does seem to be O(n), which is a relief.
--
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.