help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to set the font of a region?


From: Pascal Bourguignon
Subject: Re: How to set the font of a region?
Date: 29 Jul 2004 17:28:21 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Pascal Bourguignon <spam@thalassa.informatimago.com> writes:

> I tried this (on X, emacs 21.3.1): 
> 
> (let* ((default-font "-*-console-medium-r-normal-*-16-*-*-*-*-*-*-*")
>        (default-face (gensym "face")))
>   (make-face default-face)
>   (set-face-font default-face default-font)
>   (dolist (font font-list)
>     (let ((face (gensym "face")))
>       (make-face face)
>       (set-face-font face font)
>       (let ((start (point)))
>         (insert font)
>         (insert "\n")
>         (facemenu-add-face 'default start (point))
>         (facemenu-set-face default-face start (point)))
>       (let ((start (point)))
>         (insert "The lazy dog jumped over the fast fox! (let [it {be} and] 
> say) no.more;\n")
>         (facemenu-add-face 'default start (point))
>         (facemenu-set-face face start (point))))))
> 
> -->
> 
> --international-medium-r-normal--15-150-72-72-m-90-iso8859-1
> The lazy dog jumped over the fast fox! (let [be {it} and] say) no.more;
> --iris-medium-r-normal--10-100-72-72-m-60-iso8859-1
> The lazy dog jumped over the fast fox! (let [be {it} and] say) no.more;
> --iris-medium-r-normal--12-120-72-72-m-80-iso8859-1
> The lazy dog jumped over the fast fox! (let [be {it} and] say) no.more;
> --iris-medium-r-normal--13-130-72-72-m-90-iso8859-1
> The lazy dog jumped over the fast fox! (let [be {it} and] say) no.more;
> ...
> 
> 
> but all the text generated keeps the same default font.  Why my
> facemenu-set-face calls are without effect?

No, apart being much slower, there's no change in results.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

There is no worse tyranny than to force a man to pay for what he does not
want merely because you think it would be good for him. -- Robert Heinlein


reply via email to

[Prev in Thread] Current Thread [Next in Thread]