emacs-devel
[Top][All Lists]
Advanced

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

Re: Bold by moving pixels problem


From: Stefan Monnier
Subject: Re: Bold by moving pixels problem
Date: Wed, 20 Nov 2002 20:33:44 -0500

> I would like everything with bold to be `normal' weight; I then use
> color to indicate bold.  With this laptop screen, that works best.  (I
> am using "DodgerBlue4" for background and "cyan" for foreground --
> suits me well.)
> 
>    So maybe it would be better to add a more general feature that could also
>    make such a decision based on the actual font rather than universally.
> 
> Yes.

How about a face transformer hook called at the end of face-set-spec
as in the patch below ?
We should of course come up with useful functions to put on
that hook.  For example to turn italics into underline or bold
into something else.  Or to enforce a minimum contrast between
foreground and background color, ...


        Stefan


Index: faces.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/faces.el,v
retrieving revision 1.272
diff -u -u -b -r1.272 faces.el
--- faces.el    6 Sep 2002 07:14:29 -0000       1.272
+++ faces.el    21 Nov 2002 01:31:09 -0000
@@ -1377,7 +1379,8 @@
               (setq attribute nil))))
        (when attribute
          (set-face-attribute face frame attribute value)))
-      (setq attrs (cdr (cdr attrs))))))
+      (setq attrs (cdr (cdr attrs)))))
+  (run-hook-with-args 'face-transformer-functions face frame))
 
 
 (defun face-attr-match-p (face attrs &optional frame)





reply via email to

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