Ar an deichiú lá de mí na Samhain, scríobh Stephen J. Turnbull:
Raymond Toy writes:
> >>>>> "Charles" == Charles Waldman
<cgw(a)alum.mit.edu> writes:
> Charles> I configured --with-xft, installed a whole bunch of
> Charles> fonts, but none of them seem to be available, either
> Charles> via the command-line "-font" flag, or through the
> Charles> options menu.
Yup. That's why I repeatedly vetoed a release of a distribution with
Xft in the mainline, and still can't turn it on by default. I was
overruled on the basis that if we put it in, someone would scratch the
itch. That was what, five, six years ago? The only people who have
done anything with Xft since then are me and Aidan.
... patches welcome ...
The only ways to use Xft fonts AFAIK are through resources (use the
FcFontName and fcFontName class and instance attributes on the various
font resources) and from Lisp (eg, using set-face-font). I suspect
Customize doesn't work, either.
The menu has never worked with XFT. X resources usually work, customize has
never worked (Customize is *way* less important than the menu working), and
the following Lisp code usually works (you can change Monospace-11.5 to
whatever you’d like):
(with-fboundp '(fc-name-unparse fc-font-match fc-name-parse)
(set-specifier
(face-font 'default)
(cons '(x)
(fc-name-unparse
(fc-font-match (selected-device)
(fc-name-parse "Monospace-11.5:lang=en")))))
(macrolet
((define-tags-and-set-faces (&rest tag-details)
(cons
'progn
(mapcan
(function*
(lambda ((tag-name regex size))
`((define-specifier-tag ',tag-name nil
#'(lambda (charset)
(string-match ,regex
(symbol-name (charset-name charset)))))
(set-face-font 'default
(fc-name-unparse
(fc-font-match
(selected-device)
(fc-name-parse ,(format "-%d:lang=%s" size tag-name)))
nil '(x ,tag-name) 'append)))))
tag-details))))
(define-tags-and-set-faces
(zh-tw "^chinese-\\(big5\\|cns\\)" 18)
(zh "^chinese-" 18)
(ja "^\\(japanese\\|katakana\\)-" 18)
(ko "^korean-" 18)
(am "^ethiopic-" 18)
(vi "^vietnamese-" 14)
(el "^greek-" 12)
(ru "^cyrillic-" 12)
(hu "^latin-iso8859-2" 12)
(ar "^arabic-" 16)
(lo "^lao" 14)
(he "^hebrew" 11.5)
(th "^thai" 14))))
If you don’t care about writing anything but English, or at a stretch
something else Windows-1252-compatible, the #'set-specifier call should be
enough.
(I believe Raymond uses the above code already!)
My own priorities place GTK support far higher than XFT support, so I’m not
going to fix any of these issues this calendar year or next calendar year.
--
‘Liston operated so fast that he once accidentally amputated an assistant’s
fingers along with a patient’s leg, […] The patient and the assistant both
died of sepsis, and a spectator reportedly died of shock, resulting in the
only known procedure with a 300% mortality.’ (Atul Gawande, NEJM, 2012)
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta