From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/9607 Path: main.gmane.org!not-for-mail From: "William M. Perry" Newsgroups: gmane.emacs.gnus.general Subject: Re: XEmacs & buffer-local fonts Date: Fri, 24 Jan 1997 07:16:20 -0800 Message-ID: <199701241516.HAA04114@newman> References: Reply-To: wmperry@aventail.com NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035149605 19435 80.91.224.250 (20 Oct 2002 21:33:25 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 21:33:25 +0000 (UTC) Cc: ding@ifi.uio.no Return-Path: Original-Received: from ifi.uio.no (0@ifi.uio.no [129.240.64.2]) by deanna.miranova.com (8.8.5/8.8.5) with SMTP id HAA17716 for ; Fri, 24 Jan 1997 07:58:10 -0800 Original-Received: from newman (root@newman.aventail.com [38.225.141.10]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id ; Fri, 24 Jan 1997 16:18:05 +0100 Original-Received: from kramer.in.aventail.com.aventail.com (wmperry@kramer [192.168.1.12]) by newman (8.6.12/8.6.9) with SMTP id HAA04114; Fri, 24 Jan 1997 07:16:20 -0800 Original-To: Lars Magne Ingebrigtsen In-Reply-To: Errors-to: wmperry@aventail.com X-Face: O~Rn;(l][/-o1sALg4A@xpE:9-"'IR[%;,,!m7I just decided that I wanted the article buffer to use a proportional >font. I thought that would be a breeze, but after reading the XEmacs >manual some, it doesn't seem like a simple thing to do. I must be >overlooking something. > >So I did this, and it works, but it's slow. So... What's the *real* >way of doing something like this? > >(defun lars-xmas-set-faces-font () > "Set the font of all faces in the buffer to one font." > (let ((faces (face-list)) > (font "-adobe-new century schoolbook-medium-r-normal--14-140-75-75-p-82-iso8859-1") > face props) > (while (setq face (pop faces)) > (setq props (font-properties (face-font face))) > (set-face-font face font (current-buffer)) > (when (equal (downcase (or (cdr (assq 'WEIGHT_NAME props)) "")) "bold") > (make-face-bold face (current-buffer))) > (when (equal (downcase (or (cdr (assq 'SLANT props)) "")) "i") > (make-face-italic face (current-buffer)))))) > >(when (string-match "XEmacs" emacs-version) > (add-hook 'gnus-article-mode-hook 'lars-xmas-set-faces-font)) This is why we need the 'font.el' package I wrote converted into C. For this, you'd just have: (set-font-property (face-font 'default) 'family "serif" (current-buffer)) Ok, anybody want to volunteer? :) -Bill P.