#112 Support italic text

v3.8
closed-fixed
None
5
2014-12-11
2013-09-17
No

The attached patch adds italic support.

In order for this to work, your terminal has to support it (rxvt-unicode, gnome-terminal, and recent version of konsole supports), verify by:

echo -e '\e[3mTerminal supports italic\e[0m'

and it has to be present in your terminfo database for your $TERM, verify by:

tput sitm; echo 'Terminfo knows about italic support'; tput ritm

1 Attachments

Discussion

  • Egmont Koblinger

    Minor update to the patch: make the hardwired fallback termcap contain the necessary entries.

     
  • Egmont Koblinger

    Note: nowadays xterm also supports italic, and it's been added to ncurses/terminfo too, so on newest Linux systems TERM=xterm contains the desired entries by default.

     
  • John J. Jordan

    John J. Jordan - 2014-12-11

    Patch looks good. I think I'll only change the bit in scrn.h, instead of shifting everything up. There's no reason to keep the lower 8 bits clear in the attribute (anymore), and I'd rather not have a signed shift surprise anyone randomly, or do the right thing and make it unsigned everywhere.

     
  • Egmont Koblinger

    That's a good point. It works for me on x86_64/gcc, but a quick googling suggests that the behavior is undefined. Using unsigned, or not using the leftmost bit are the safe bets. Thanks!

     
  • John J. Jordan

    John J. Jordan - 2014-12-11
    • status: open --> closed-fixed
    • assigned_to: John J. Jordan
     
  • John J. Jordan

    John J. Jordan - 2014-12-11
    • Group: CVS --> v3.8
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks