From: "William M. Perry" <wmperry@aventail.com>
Cc: ding@ifi.uio.no
Subject: Re: XEmacs & buffer-local fonts
Date: Fri, 24 Jan 1997 07:16:20 -0800 [thread overview]
Message-ID: <199701241516.HAA04114@newman> (raw)
In-Reply-To: <m2680nw4j6.fsf@proletcult.slip.ifi.uio.no>
Lars Magne Ingebrigtsen writes:
>I 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.
next prev parent reply other threads:[~1997-01-24 15:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-01-24 14:07 Lars Magne Ingebrigtsen
1997-01-24 15:16 ` William M. Perry [this message]
1997-01-24 21:04 ` The article buffer, and proportional fonts Steinar Bang
1997-01-25 2:56 ` Steven L Baur
1997-01-25 7:38 ` Lars Magne Ingebrigtsen
[not found] <"m2680nw4j6.fsf"@proletcult.slip.ifi.uio.no>
1997-01-25 3:39 ` XEmacs & buffer-local fonts Andrew J Cosgriff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199701241516.HAA04114@newman \
--to=wmperry@aventail.com \
--cc=ding@ifi.uio.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).