Ignore:
Timestamp:
Oct 22, 2006, 6:35:25 PM (14 years ago)
Author:
Sam Hocevar
Message:
  • Support for fullwidth glyphs in the libcaca output drivers.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca/driver_conio.c

    r1006 r1218  
    100100    uint32_t *attr = dp->cv->attr;
    101101    uint32_t *chars = dp->cv->chars;
    102     int n;
     102    unsigned int n;
    103103
    104104    for(n = dp->cv->height * dp->cv->width; n--; )
    105105    {
    106         *screen++ = cucul_utf32_to_cp437(*chars++);
     106        char ch = cucul_utf32_to_cp437(*chars++);
     107        if(n && *chars == CUCUL_MAGIC_FULLWIDTH)
     108        {
     109            *screen++ = '[';
     110            *screen++ = _cucul_argb32_to_ansi8(*attr++);
     111            ch = ']';
     112            chars++;
     113            n--;
     114        }
     115        *screen++ = ch;
    107116        *screen++ = _cucul_argb32_to_ansi8(*attr++);
    108117    }
Note: See TracChangeset for help on using the changeset viewer.