From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: Re: Bold by moving pixels problem Date: Wed, 20 Nov 2002 20:33:44 -0500 Sender: emacs-devel-admin@gnu.org Message-ID: <200211210133.gAL1XiP23941@rum.cs.yale.edu> References: <20021120220834.GC29543@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1037842828 32421 80.91.224.249 (21 Nov 2002 01:40:28 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 21 Nov 2002 01:40:28 +0000 (UTC) Cc: miles@gnu.org, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18EgKP-0008Qf-00 for ; Thu, 21 Nov 2002 02:40:25 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18EgNr-0003s7-00 for ; Thu, 21 Nov 2002 02:43:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18EgET-0001HE-00; Wed, 20 Nov 2002 20:34:17 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 18EgE2-00017S-00 for emacs-devel@gnu.org; Wed, 20 Nov 2002 20:33:50 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 18EgE1-00016j-00 for emacs-devel@gnu.org; Wed, 20 Nov 2002 20:33:50 -0500 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by monty-python.gnu.org with esmtp (Exim 4.10) id 18EgDz-000162-00; Wed, 20 Nov 2002 20:33:47 -0500 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.11.6/8.11.6) id gAL1XiP23941; Wed, 20 Nov 2002 20:33:44 -0500 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: "Robert J. Chassell" Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:9588 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:9588 > 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)