forked from pool/xemacs
65 lines
2.0 KiB
Diff
65 lines
2.0 KiB
Diff
lisp/ChangeLog addition:
|
|
|
|
2007-08-03 Aidan Kehoe <kehoea@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 and colons in font family names.
|
|
|
|
|
|
XEmacs Trunk source patch:
|
|
Diff command: cvs -q diff -u
|
|
Files affected: lisp/font.el
|
|
===================================================================
|
|
RCS
|
|
|
|
Index: lisp/font.el
|
|
===================================================================
|
|
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/font.el,v
|
|
retrieving revision 1.20
|
|
diff -u -r1.20 font.el
|
|
--- lisp/font.el 2006/04/25 14:01:53 1.20
|
|
+++ lisp/font.el 2007/08/03 13:31:05
|
|
@@ -587,7 +587,13 @@
|
|
(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 @@
|
|
;;; #### 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.)
|
|
+ "\\(-[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
|
|
|