diff --git a/USAGE.md b/USAGE.md index 581d058c1..7e2400e8f 100644 --- a/USAGE.md +++ b/USAGE.md @@ -2983,7 +2983,7 @@ channels_set_bg_default(uint64_t* channels){ familiar pixel graphics routines, and then rendered to a (character- graphics) plane using a variety of blitting methods: -* Space with background color -- the only blitter that works in ASCII +* Space with background color -- the only cell blitter that works in ASCII mode. 1:1 pixels map losslessly to 2:1 cells. * Unicode upper- and lower-half blocks (▀ and ▄, respectively). 2:1 pixels map losslessly to 2:1 cells. The default blitting mode. @@ -2991,6 +2991,7 @@ graphics) plane using a variety of blitting methods: * Unicode sextants. 3x2 pixels map to 2:1 cells. * Braille. 4:2 pixels map to 2:1 cells. Useful when only two colors are needed in a small area, due to high resolution. +* Sixel- and Kitty-based bitmaps. It is most typicaly to prepare `ncvisual`s from files on disk (see [Multimedia](#multimedia) below); this requires Notcurses to be built against @@ -3086,7 +3087,7 @@ typedef enum { NCBLIT_2x2, // quadrants + 2x1 ▗▐ ▖▀▟▌▙ NCBLIT_3x2, // sextants (*NOT* 2x2) 🬀🬁🬂🬃🬄🬅🬆🬇🬈🬉🬊🬋🬌🬍🬎🬏🬐🬑🬒🬓🬔🬕🬖🬗🬘🬙🬚🬛🬜🬝🬞 NCBLIT_BRAILLE, // 4 rows, 2 cols (braille) ⡀⡄⡆⡇⢀⣀⣄⣆⣇⢠⣠⣤⣦⣧⢰⣰⣴⣶⣷⢸⣸⣼⣾⣿ - NCBLIT_PIXEL, // pixel graphics + NCBLIT_PIXEL, // pixel graphics (also work in ASCII) NCBLIT_4x1, // four vertical levels █▆▄▂ (plots only) NCBLIT_8x1, // eight vertical levels █▇▆▅▄▃▂▁ (plots only) } ncblitter_e; diff --git a/doc/man/man3/notcurses_visual.3.md b/doc/man/man3/notcurses_visual.3.md index b5141610c..aba12bbb5 100644 --- a/doc/man/man3/notcurses_visual.3.md +++ b/doc/man/man3/notcurses_visual.3.md @@ -171,12 +171,12 @@ is interpreted as an **ncalign_e** rather than an absolute position. The different **ncblitter_e** values select from among available glyph sets: * **NCBLIT_DEFAULT**: Let the **ncvisual** choose its own blitter. -* **NCBLIT_1x1**: Spaces only. Works in ASCII, unlike other blitters. +* **NCBLIT_1x1**: Spaces only. Works in ASCII, unlike most other blitters. * **NCBLIT_2x1**: Adds the half blocks (▄▀) to **NCBLIT_1x1**. * **NCBLIT_2x2**: Adds left and right half blocks (▌▐) and quadrants (▖▗▟▙) to **NCBLIT_2x1**. * **NCBLIT_3x2**: Adds sextants to **NCBLIT_1x1**. * **NCBLIT_BRAILLE**: 4 rows and 2 columns of braille (⡀⡄⡆⡇⢀⣀⣄⣆⣇⢠⣠⣤⣦⣧⢰⣰⣴⣶⣷⢸⣸⣼⣾⣿). -* **NCBLIT_PIXEL**: Adds pixel graphics. +* **NCBLIT_PIXEL**: Adds pixel graphics (these also work in ASCII). Two more blitters exist for plots, but are unsuitable for generic media: diff --git a/src/lib/blit.c b/src/lib/blit.c index c75f85fb4..b5fb14d5a 100644 --- a/src/lib/blit.c +++ b/src/lib/blit.c @@ -897,8 +897,8 @@ const struct blitset* lookup_blitset(const tinfo* tcache, ncblitter_e setid, boo return NULL; } } - // the only viable blitter in ASCII is NCBLIT_1x1 - if(!tcache->utf8 && setid != NCBLIT_1x1){ + // the only viable blitters in ASCII are NCBLIT_1x1 and NCBLIT_PIXEL + if(!tcache->utf8 && (setid != NCBLIT_1x1 && setid != NCBLIT_PIXEL)){ if(may_degrade){ setid = NCBLIT_1x1; }else{