[Top][All Lists]

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

Re: Bold by moving pixels problem

From: Miles Bader
Subject: Re: Bold by moving pixels problem
Date: Tue, 17 Dec 2002 18:54:05 -0500
User-agent: Mutt/1.3.28i

On Tue, Dec 17, 2002 at 04:38:57PM +0000, Robert J. Chassell wrote:
> My only issue is semantic:  I continue to have `bold' faces, but I
> set `bold' to be a color, not a weight.  What it seems you are doing
> is not so much `unboldifying' the face as removing a
>     :weight bold
> attribute.  Should we not call the defun  `face-normal-weight'?

Well, I didn't think very much about the name of that function.  It probably
shouldn't really use the work `face', because it doesn't operate on normal
faces, but rather the low-level internal representation of them (for which
the term `lface' is sometimes used).

You can make it translate bold into a color too, by similarly

  (defun lface-change-bold-to-yellow (lface)
    (if (memq (aref lface 4) '(bold heavy ...)) ; whatever weights you need
          (aset lface 4 'normal)  ; unboldify
          (aset lface 8 "yellow"))))

WARNING: When I was trying a more complicated function like this yesterday,
my emacs aborted (in UNBLOCK_INPUT), so something funny is going on, I'm not
sure exactly what.  However it might still be too dangerous for casual use
(luckily emacs is great at not losing data, but it's still no fun when it

[|nurgle|]  ddt- demonic? so quake will have an evil kinda setting? one that 
            will  make every christian in the world foamm at the mouth? 
[iddt]      nurg, that's the goal 

reply via email to

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