Skip to content

Commit

Permalink
2008-02-04 Magnus Henoch <mange@freemail.hu>
Browse files Browse the repository at this point in the history
	* lisp/font.el (font-x-font-regexp-foundry-and-family): Add from
	last version of w3-sysdp.
	(x-font-create-object): Use it instead of
	x-font-regexp-foundry-and-family.
  • Loading branch information
Magnus Henoch committed Feb 4, 2008
1 parent 1051911 commit 1c703f8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
2008-02-04 Magnus Henoch <mange@freemail.hu>

* lisp/font.el (font-x-font-regexp-foundry-and-family): Add from
last version of w3-sysdp.
(x-font-create-object): Use it instead of
x-font-regexp-foundry-and-family.

* lisp/Makefile.in (EXTRAS): Remove w3-sysdp.el.
(W3_SOURCES): Add w3-compat.el.

Expand Down
11 changes: 9 additions & 2 deletions lisp/font.el
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

;; Author: wmperry
;; Maintainer: Bill Perry <wmperry@gnu.org>
;; Created: $Date: 2006/12/15 14:40:54 $
;; Created: $Date: 2008/02/04 06:29:13 $

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Copyright (c) 1995, 1996 by William M. Perry <wmperry@cs.indiana.edu>
Expand Down Expand Up @@ -448,6 +448,13 @@ These are for use in the `weight' field of an X font string.")
registry - encoding "\\'"
))))

(defvar font-x-font-regexp-foundry-and-family
(let ((- "[-?]")
(foundry "[^-]+")
(family "[^-]+")
)
(concat "\\`[-?*]" foundry - "\\(" family "\\)" -)))

(defvar font-x-registry-and-encoding-regexp
(or (and (featurep 'xemacs)
(boundp 'x-font-regexp-registry-and-encoding)
Expand Down Expand Up @@ -506,7 +513,7 @@ These are for use in the `weight' field of an X font string.")
(retval nil)
(case-fold-search t)
)
(if (not (string-match x-font-regexp-foundry-and-family fontname))
(if (not (string-match font-x-font-regexp-foundry-and-family fontname))
nil
(setq family (list (downcase (match-string 1 fontname)))))
(if (string= "*" weight) (setq weight nil))
Expand Down

0 comments on commit 1c703f8

Please sign in to comment.