On Mon, 3 Jan 2005, giacomo.boffi(a)polimi.it wrote:
may i ask a correlated Q? is it possible to ask XEmacs for the X
font
description of the face at point?
This code describes the face used at point, which includes font information.
(global-set-key [(control button3)] 'describe-face-at-mouse-point)
;;****************************************************************
;; DESCRIBE-FACE-AT-MOUSE-POINT
;; DESCRIBE-FACE-AT-POINT
;;****************************************************************
(defun describe-face-at-mouse-point (event)
(interactive "*e")
(let ((point (save-excursion
(save-window-excursion
(mouse-set-point event)
(point)))))
(describe-face-at-point point)))
(defun describe-face-at-point (&optional point)
"Return face used at point."
(interactive)
(let ((face (get-char-property (or point (point)) 'face)))
(if (listp face)
(progn
(message (format "Full value: %s" (prin1-to-string face)))
(setq face (car face))))
(hyper-describe-face face)))
If you want the exact font spec, you can get that with font-truename, eg:
(font-truename (face-font 'default))
-jeff