Mercurial > hg > xemacs-beta
comparison lisp/x-font-menu.el @ 3360:316fddbf58e2
[xemacs-hg @ 2006-04-25 14:01:52 by stephent]
Repair broken commit to Xft code. <87aca9n4in.fsf@tleepslib.sk.tsukuba.ac.jp>
author | stephent |
---|---|
date | Tue, 25 Apr 2006 14:02:09 +0000 |
parents | 15fb91e3a115 |
children | d8309294c81c |
comparison
equal
deleted
inserted
replaced
3359:af8dab703edc | 3360:316fddbf58e2 |
---|---|
33 ;;; "*If non-nil, then the font menu will only show fixed-width fonts.") | 33 ;;; "*If non-nil, then the font menu will only show fixed-width fonts.") |
34 | 34 |
35 (require 'font-menu) | 35 (require 'font-menu) |
36 | 36 |
37 (when (featurep 'xft-fonts) | 37 (when (featurep 'xft-fonts) |
38 (require 'xft) | |
39 (require 'fontconfig)) | 38 (require 'fontconfig)) |
40 | 39 |
41 (globally-declare-boundp | 40 (globally-declare-boundp |
42 '(x-font-regexp | 41 '(x-font-regexp |
43 x-font-regexp-foundry-and-family | 42 x-font-regexp-foundry-and-family |
274 (x-font-menu-font-data-xft face dcache name domain)) | 273 (x-font-menu-font-data-xft face dcache name domain)) |
275 ;; #### this one, too | 274 ;; #### this one, too |
276 (x-font-menu-font-data-core face dcache)))) | 275 (x-font-menu-font-data-core face dcache)))) |
277 | 276 |
278 (defun x-font-menu-font-data-xft (face dcache name domain) | 277 (defun x-font-menu-font-data-xft (face dcache name domain) |
278 ;; DOMAIN is expected to be a device. | |
279 (let* ((truename (font-instance-truename | 279 (let* ((truename (font-instance-truename |
280 (face-font-instance face domain | 280 (face-font-instance face domain |
281 (if (featurep 'mule) 'ascii)))) | 281 (if (featurep 'mule) 'ascii)))) |
282 entry) | 282 entry) |
283 (if (xlfd-font-name-p truename) | 283 (if (xlfd-font-name-p truename) |
284 (progn | 284 (progn |
285 nil) | 285 nil) |
286 (progn | 286 (progn |
287 (let* ((pattern (fc-font-real-pattern name domain)) | 287 (let* ((pattern (fc-font-match domain (fc-name-parse name))) |
288 (family (and pattern | 288 (family (and pattern |
289 (fc-pattern-get-family pattern 0)))) | 289 (fc-pattern-get-family pattern 0)))) |
290 (if (fc-pattern-get-successp family) | 290 (if (fc-pattern-get-successp family) |
291 (setq entry (vassoc family (aref dcache 0)))) | 291 (setq entry (vassoc family (aref dcache 0)))) |
292 (if (null entry) | 292 (if (null entry) |