comparison lisp/font.el @ 4766:32b358a240b0

Avoid calling Xft if not built in.
author Stephen J. Turnbull <stephen@xemacs.org>
date Sat, 05 Dec 2009 01:02:33 +0900
parents aa5ed11f473b
children e0db3c197671 8b2f75cecb89
comparison
equal deleted inserted replaced
4765:1257b938f03a 4766:32b358a240b0
567 "Return a font descriptor object for FONTNAME, appropriate for X devices." 567 "Return a font descriptor object for FONTNAME, appropriate for X devices."
568 (let ((case-fold-search t)) 568 (let ((case-fold-search t))
569 (if (or (not (stringp fontname)) 569 (if (or (not (stringp fontname))
570 (not (string-match font-x-font-regexp fontname))) 570 (not (string-match font-x-font-regexp fontname)))
571 (if (and (stringp fontname) 571 (if (and (stringp fontname)
572 (featurep 'xft-fonts)
572 (string-match font-xft-font-regexp fontname)) 573 (string-match font-xft-font-regexp fontname))
573 ;; Return an XFT font. 574 ;; Return an XFT font.
574 (xft-font-create-object fontname) 575 (xft-font-create-object fontname)
575 ;; It's unclear how to parse the font; return an unspecified 576 ;; It's unclear how to parse the font; return an unspecified
576 ;; one. 577 ;; one.