Mercurial > hg > xemacs-beta
comparison lisp/font-menu.el @ 3918:049dc907c17a
[xemacs-hg @ 2007-04-22 19:58:27 by aidan]
Make the X11 font menu work again, server side X11 with Mule.
author | aidan |
---|---|
date | Sun, 22 Apr 2007 19:58:59 +0000 |
parents | ad2f4ae9895b |
children | 3889ef128488 308d34e9f07d |
comparison
equal
deleted
inserted
replaced
3917:b8ded6c3f2a4 | 3918:049dc907c17a |
---|---|
363 (int-to-string (or size from-size)) | 363 (int-to-string (or size from-size)) |
364 (concat (int-to-string | 364 (concat (int-to-string |
365 (/ (or size from-size) | 365 (/ (or size from-size) |
366 (specifier-instance font-menu-size-scaling | 366 (specifier-instance font-menu-size-scaling |
367 (selected-device)))) | 367 (selected-device)))) |
368 "pt")))) | 368 "pt"))) |
369 new-spec-list) | |
370 ;; If the font was initialised from X resources (the tag-set | |
371 ;; contains 'x-resource) pretend to Custom that it has | |
372 ;; responsibility for those settings. | |
373 (map-specifier (face-font 'default) | |
374 (lambda (spec locale inst-list arg) | |
375 (loop | |
376 for (tag-set . inst) | |
377 in inst-list | |
378 do (setq tag-set (delq 'x-resource tag-set) | |
379 tag-set (delq 'custom tag-set) | |
380 tag-set (cons 'custom tag-set)) | |
381 (push (cons tag-set inst) new-spec-list) | |
382 ;; Need to return nil, else map-specifier stops | |
383 finally return nil)) | |
384 nil nil '(x-resource)) | |
385 (remove-specifier (face-font 'default) nil '(x-resource)) | |
386 (when new-spec-list | |
387 (add-spec-list-to-specifier (face-font 'default) | |
388 (list (cons 'global new-spec-list)))) | |
369 (custom-set-face-update-spec 'default | 389 (custom-set-face-update-spec 'default |
370 (list (list 'type (device-type))) | 390 (list (list 'type (device-type))) |
371 (list :family (or family from-family) | 391 (list :family (or family from-family) |
372 :size fsize)))) | 392 :size fsize)))) |
373 (message "Font %s" (face-font-name 'default)))) | 393 (message "Font %s" (face-font-name 'default)))) |
374 | |
375 | 394 |
376 ;; #### This should be called `font-menu-maybe-change-face' | 395 ;; #### This should be called `font-menu-maybe-change-face' |
377 ;; I wonder if a better API wouldn't (face attribute from to) | 396 ;; I wonder if a better API wouldn't (face attribute from to) |
378 (defun font-menu-change-face (face | 397 (defun font-menu-change-face (face |
379 from-family from-weight from-size | 398 from-family from-weight from-size |