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

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

bug#3530: Simultaneously both bold and dim (italic) face attributes for


From: Chuck Blake
Subject: bug#3530: Simultaneously both bold and dim (italic) face attributes for ttys
Date: Wed, 10 Jun 2009 23:35:06 -0400
User-agent: Mutt/1.5.19 (2009-01-05)

Hey guys.  I am not subscribed to these lists so be sure to group
reply on any feedback to this.

--
The context/bug:
--

dim is really implied by italic conventions in the original face.
I have a tty that can do italics (rxvt).  I have my terminfo/termcap
setup specify that "dim" send the escape sequences for italic.
This works great -- bold maps to tty bold (actually a bold font)
and italic maps to tty italic (actually an italic font).

However, I cannot do both bold and italic at the same time.
make-face-bold-italic works fine and all that.  And the terminal
program itself supports a true bold-italic font.

XTerm also has simultaneous bold & italic actual fonts as well.

--
Proposed remedy:
--

I tracked down the problem to basically "if (bold) *else* if (dim)"
logic in src/term.c.  See the below patch.

There seems little or no reason to me why bold font and dim color
ought be mutually exclusive or why ttys would choke on that rather
than ignoring one or the other if they can't support it.

Blinking and underlining attributes are not treated that way, either.

Nor can I find any record in the CVS logs of this logic being 
related to any bug fix to support any fragile terminal.
At least according to cvs annotate, the logic in question has been
untouched since the re-write of term.c by 'gerd' back in the Summer
of 1999.

Perhaps they just "sounded" mutually exclusive and hence the "else".

In any case, if the user simply does not specify both bold and italic
on faces this patch changes nothing.  So, it seems pretty reasonable
to drop the else and allow simultaneous bold & italic.

Thanks!!
cb

--
The Patch
--

Index: term.c
===================================================================
RCS file: /sources/emacs/emacs/src/term.c,v
retrieving revision 1.242
diff -u -w -r1.242 term.c
--- term.c      30 Apr 2009 05:02:03 -0000      1.242
+++ term.c      11 Jun 2009 02:52:31 -0000
@@ -1974,7 +1974,7 @@
       if (MAY_USE_WITH_COLORS_P (tty, NC_BOLD))
        OUTPUT1_IF (tty, tty->TS_enter_bold_mode);
     }
-  else if (face->tty_dim_p)
+  if (face->tty_dim_p)
     if (MAY_USE_WITH_COLORS_P (tty, NC_DIM))
       OUTPUT1_IF (tty, tty->TS_enter_dim_mode);
 






reply via email to

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