CVS update by aidan xemacs/lisp ...
xemacs-cvs at xemacs.org
xemacs-cvs at xemacs.org
Mon Aug 6 03:00:33 EDT 2007
User: aidan
Date: 07/08/06 09:00:33
Modified: xemacs/lisp ChangeLog font.el
Log:
Handle XFT fonts in x-font-create-object.
Revision Changes Path
1.823 +8 -0 XEmacs/xemacs/lisp/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/ChangeLog,v
retrieving revision 1.822
retrieving revision 1.823
diff -u -p -r1.822 -r1.823
--- ChangeLog 2007/08/04 20:00:10 1.822
+++ ChangeLog 2007/08/06 07:00:26 1.823
@@ -1,3 +1,11 @@
+2007-08-06 Aidan Kehoe <kehoea at parhasard.net>
+
+ * font.el (x-font-create-object):
+ When handed an XFT font name string, parse it as such.
+ * font.el (font-xft-font-regexp):
+ Don't check for the existence of xft-font-regexp; accept escaped
+ dashes, colons and commas in font family names.
+
2007-08-04 Aidan Kehoe <kehoea at parhasard.net>
* unicode.el:
1.21 +14 -9 XEmacs/xemacs/lisp/font.el
Index: font.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/font.el,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -p -r1.20 -r1.21
--- font.el 2006/04/25 14:01:53 1.20
+++ font.el 2007/08/06 07:00:27 1.21
@@ -587,7 +587,13 @@ The type may be the strings \"px\", \"pi
(let ((case-fold-search t))
(if (or (not (stringp fontname))
(not (string-match font-x-font-regexp fontname)))
- (make-font)
+ (if (and (stringp fontname)
+ (string-match font-xft-font-regexp fontname))
+ ;; Return an XFT font.
+ (xft-font-create-object fontname)
+ ;; It's unclear how to parse the font; return an unspecified
+ ;; one.
+ (make-font))
(let ((family nil)
(size nil)
(weight (match-string 1 fontname))
@@ -751,16 +757,15 @@ The type may be the strings \"px\", \"pi
;;; #### FIXME actually, this section should be fc-*, right?
(defvar font-xft-font-regexp
- ;; #### FIXME what the fuck?!?
- (when (and (boundp 'xft-font-regexp) xft-font-regexp)
- (concat "\\`"
- "[^:-]*" ; optional foundry and family
- ; incorrect, escaping exists
- "\\(-[0-9]*\\(\\.[0-9]*\\)?\\)?" ; optional size (points)
- "\\(:[^:]*\\)*" ; optional properties
+ (concat "\\`"
+ #r"\(\\-\|\\:\|\\,\|[^:-]\)*" ; optional foundry and family
+ ; (allows for escaped colons,
+ ; dashes, commas)
+ "\\(-[0-9]*\\(\\.[0-9]*\\)?\\)?" ; optional size (points)
+ "\\(:[^:]*\\)*" ; optional properties
; not necessarily key=value!!
"\\'"
- )))
+ ))
(defvar font-xft-family-mappings
;; #### FIXME this shouldn't be needed or used for Xft
More information about the XEmacs-CVS
mailing list