explicit fonts in specifier code?

stephen at xemacs.org stephen
Sun Nov 12 23:23:56 EST 2006


Aidan Kehoe writes:

 > Previous to this change, there was no way to set the font used for a face
 > when using a given non-ASCII Mule charset. Now, such a customisation is
 > possible, and relatively painless:
 > 
 > (define-specifier-tag 'ipa nil (lambda (charset) (eq charset (find-charset
 > 'ipa))))
 > (set-face-font 'default "-etl-fixed-medium-r-normal--24-240-72-72-c-120-muleipa-1" '(x ipa))

(Your syntax is incorrect, '(x ipa) should be a specifier locale.)
And what's wrong with (in a pre-patch XEmacs)

(define-specifier-tag 'jisx0208 nil)
(set-face-font 'default "-my-favorite-font-for-jisx0208"
               nil '(jisx0208 x) 'remove-tag-set-append)

Of course there's a bootstrap problem that you need to clean out all
the specifications that are JIS X 0208 fonts but don't have that
specifier tag, or they'll be shadowed.  (If appropriate, you could use
'remove-tag-set-prepend, and avoid that problem.)  I don't have a
general solution to the bootstrap problem (I just removed the
particular specs I don't like in a hard-coded way), but I've used this
technique off and on for nearly a decade now.



More information about the XEmacs-Beta mailing list