Ignore:
Timestamp:
Nov 27, 2003, 10:56:30 PM (17 years ago)
Author:
Sam Hocevar
Message:
  • NOTES: + Added setab/setaf quotes from the XTerm terminfo. + Proposed a workaround for bright colours on any terminal.
  • src/caca.c: + 16 colour support for ncurses and conio.
  • src/graphics.c: + Ported to 16 colour support. + Added a missing <stdio.h> for BUFSIZ. + Disabled vsnprintf under DOS (only vsprintf exists).
  • examples/: + Don't abort if the caca.txt sprite was not found. + Ported to 16 colour support.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/NOTES

    r225 r226  
    44      many terminal emulators and tried to summarise which combinations
    55      worked properly and which ones did not.
     6
     7      From termcap(5):
     8
     9       set_a_background              setab        AB        Set background
     10                                                            color to #1, using
     11                                                            ANSI escape
     12       set_a_foreground              setaf        AF        Set foreground
     13                                                            color to #1, using
     14                                                            ANSI escape
     15      From the xterm terminfo:
     16
     17        setab=\E[4%p1%dm, setaf=\E[3%p1%dm
     18
     19      From the xterm-16color terminfo:
     20
     21        setab=\E[%?%p1%{8}%<%t%p1%{40}%+%e%p1%{92}%+%;%dm,
     22        setaf=\E[%?%p1%{8}%<%t%p1%{30}%+%e%p1%{82}%+%;%dm,
     23
     24      (http://www.sct.gu.edu.au/~anthony/info/X/Xterm_xf86.terminfo)
    625
    726   o  I tested the following terminals:
     
    2140
    2241   o  In most terminals, \e[3xm and \[4xm respectively set the foreground
    23       and background colours. x is an colour between 0 and 7 or the value
    24       9 for default value.
     42      and background colours. x is a colour between 0 and 7 or the value
     43      9 for default colour (may be transparent).
    2544
    2645      \e[0m sets everything to normal, \e[1m sets bold, \e[5m sets blink
     
    3655        for blink in '' '\e[5m'; do
    3756          for bold in '' '\e[1m'; do
    38             echo -ne "$bold$blink$invert"'\e[34m\e[43m'hop'\e[0m '
     57            echo -ne "$bold$blink$invert"'\e[33m\e[44m'hop'\e[0m '
    3958            echo "($bold$blink$invert)"
    4059          done
     
    4968
    5069      Almost works on:
    51        + xterm (bright bg works for blue, but not for red or yellow)
     70       + xterm (bright bg only works when fg is bright and then inverted,
     71         but then fg is not bright)
    5272
    5373      Fails on:
     
    7595       + pterm
    7696
    77       Failed (\e[9x and \e[10x don't work) on:
     97      Failed (\e[9x and \e[10x don't do anything) on:
    7898       + Eterm
    7999       + aterm, wterm, rxvt
    80100       + mlterm
    81        + linux
     101       + Linux console
     102
     103   o  How to draw bright colours on any terminal?
     104
     105      '\e[93;104m' -> bright yellow on bright blue
     106       doesn't work on mlterm, gnome-terminal, konsole
     107
     108      '\e[5;1;33;44m' -> bright yellow on bright blue
     109       doesn't work on mlterm, aterm/wterm/rxvt, Eterm, console
     110
     111      '\e[5;1;33;44;93;104m' -> bright yellow on bright blue
     112       works on gnome-terminal, xterm, pterm, aterm/wterm/rxvt, console
     113       doesn't work on konsole
    82114
    83115   o  S-Lang:
Note: See TracChangeset for help on using the changeset viewer.