diff -dur xemacs-21.5.29.ORIG/lisp/font.el xemacs-21.5.29/lisp/font.el
--- xemacs-21.5.29/lisp/font.el 2009-08-26 14:49:58.859385283 -0600
+++ xemacs-21.5.29/lisp/font.el 2009-08-26 14:49:20.000998807 -0600
@@ -753,14 +753,23 @@
(defvar font-xft-font-regexp
(concat "\\`"
- #r"\(\\-\|\\:\|\\,\|[^:-]\)*" ; optional foundry and family
+ #r"\(\\[-,]|[^-:,*]\)*" ; optional foundry and family
; (allows for escaped colons,
- ; dashes, commas)
+ ; dashes, commas, asterisks)
"\\(-[0-9]*\\(\\.[0-9]*\\)?\\)?" ; optional size (points)
"\\(:[^:]*\\)*" ; optional properties
; not necessarily key=value!!
"\\'"
- ))
+ )
+ "Regexp matching fontconfig font names.
+Unfortunately, there is no explicit standard specifying these. We disallow
+hyphen and comma in family names unless escaped, because they have a syntactic
+role in fontconfig names. We disallow colon because it is part of fontconfig
+name syntax, and asterisk because of the potential for confusion with an XLFD.
+We do not allow escapes for colon and asterisk because the fontconfig
+documentation doesn't specify whether they can be escaped, or how a redundant
+escape character is treated.
+#### The name of this variable is subject to change.")
(defvar font-xft-family-mappings
;; #### FIXME this shouldn't be needed or used for Xft
@@ -799,6 +808,8 @@
"Return a font descriptor object for FONTNAME, appropriate for Xft.
Optional DEVICE defaults to `default-x-device'."
+ (unless (featurep 'font-mgr)
+ (error 'unimplemented 'font-mgr "fontconfig-style font names"))
(let* ((name fontname)
(device (or device (default-x-device)))
(pattern (fc-font-match device (fc-name-parse name)))
diff -dur xemacs-21.5.29.ORIG/lisp/font-mgr.el xemacs-21.5.29/lisp/font-mgr.el
--- xemacs-21.5.29/lisp/font-mgr.el 2009-05-18 08:51:06.000000000 -0600
+++ xemacs-21.5.29/lisp/font-mgr.el 2009-08-26 14:46:44.073953826 -0600
@@ -39,7 +39,8 @@
;; #### should we wrap the world in `(unless (featurep 'font-mgr) ... )'?
-(provide 'font-mgr)
+;; #### implementation is incomplete
+;; (provide 'font-mgr)
(defvar xft-xlfd-font-regexp
(concat