Changeset 577


Ignore:
Timestamp:
Mar 10, 2006, 10:30:30 AM (15 years ago)
Author:
Sam Hocevar
Message:
  • More Unicode tests: gradient glyphs, double width characters.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/test/unicode.c

    r562 r577  
    3333    kk = caca_attach(qq);
    3434
    35     cucul_putstr(qq, 1, 1, "This is ASCII:   [ abc DEF 123 !@# ]");
    36     cucul_putstr(qq, 1, 2, "This is Unicode: [ äβç ΔЗҒ ░▒▓ ♩♔✈ ]");
     35    cucul_set_color(qq, CUCUL_COLOR_WHITE, CUCUL_COLOR_BLUE);
     36    cucul_putstr(qq, 1, 1, "Basic Unicode support");
     37
     38    cucul_set_color(qq, CUCUL_COLOR_LIGHTGRAY, CUCUL_COLOR_BLACK);
     39    cucul_putstr(qq, 1, 2, "This is ASCII:   [ abc DEF 123 !@# ]");
     40    cucul_putstr(qq, 1, 3, "This is Unicode: [ äβç ΔЗҒ ░▒▓ ♩♔✈ ]");
    3741
    3842    cucul_putstr(qq, 1, 4, "If the two lines do not have the same length, there is a bug somewhere.");
     43
     44    cucul_set_color(qq, CUCUL_COLOR_WHITE, CUCUL_COLOR_BLUE);
     45    cucul_putstr(qq, 1, 6, "Gradient glyphs");
     46
     47    cucul_set_color(qq, CUCUL_COLOR_LIGHTGRAY, CUCUL_COLOR_BLACK);
     48    cucul_putstr(qq, 31,  7, "  0%");
     49    cucul_putstr(qq, 31,  8, " 25%");
     50    cucul_putstr(qq, 31,  9, " 50%");
     51    cucul_putstr(qq, 31, 10, " 75%");
     52    cucul_putstr(qq, 31, 11, "100%");
     53
     54    cucul_set_color(qq, CUCUL_COLOR_RED, CUCUL_COLOR_CYAN);
     55    cucul_putstr(qq, 1,  7, "                             ");
     56    cucul_putstr(qq, 1,  8, "░░░░░░░░░░░░░░░░░░░░░░░░░░░░░");
     57    cucul_putstr(qq, 1,  9, "▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒");
     58    cucul_putstr(qq, 1, 10, "▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓");
     59    cucul_putstr(qq, 1, 11, "█████████████████████████████");
     60
     61    cucul_set_color(qq, CUCUL_COLOR_CYAN, CUCUL_COLOR_RED);
     62    cucul_putstr(qq, 36,  7, "█████████████████████████████");
     63    cucul_putstr(qq, 36,  8, "▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓");
     64    cucul_putstr(qq, 36,  9, "▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒");
     65    cucul_putstr(qq, 36, 10, "░░░░░░░░░░░░░░░░░░░░░░░░░░░░░");
     66    cucul_putstr(qq, 36, 11, "                             ");
     67
     68    cucul_set_color(qq, CUCUL_COLOR_WHITE, CUCUL_COLOR_BLUE);
     69    cucul_putstr(qq, 1, 13, "Double width characters");
     70
     71    cucul_set_color(qq, CUCUL_COLOR_LIGHTRED, CUCUL_COLOR_BLACK);
     72    cucul_putstr(qq, 1, 14, "ドラゴン ボーレ |");
     73    cucul_set_color(qq, CUCUL_COLOR_LIGHTGRAY, CUCUL_COLOR_BLACK);
     74    cucul_putstr(qq, 1, 15, "()()()() ()()() |");
     75    cucul_set_color(qq, CUCUL_COLOR_YELLOW, CUCUL_COLOR_BLACK);
     76    cucul_putstr(qq, 1, 16, "ドラゴン");
     77    cucul_putstr(qq, 10, 16, "ボーレ |");
     78
     79    cucul_set_color(qq, CUCUL_COLOR_LIGHTGRAY, CUCUL_COLOR_BLACK);
     80    cucul_putstr(qq, 1, 17, "If the three lines do not have the same length, there is a bug somewhere.");
    3981
    4082    caca_display(kk);
Note: See TracChangeset for help on using the changeset viewer.