mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
add notcurses_canhalfblock()/notcurses_canquadrant() #1575
This commit is contained in:
parent
9b38fe515c
commit
f4aa419a31
1
NEWS.md
1
NEWS.md
@ -3,6 +3,7 @@ rearrangements of Notcurses.
|
|||||||
|
|
||||||
* 2.2.9 (not yet released)
|
* 2.2.9 (not yet released)
|
||||||
* Added two new stats, `sprixelemissions` and `sprixelelisions`.
|
* Added two new stats, `sprixelemissions` and `sprixelelisions`.
|
||||||
|
* Added `notcurses_canhalfblock()` and `notcurses_canquadrant()`.
|
||||||
|
|
||||||
* 2.2.8 (2021-04-18)
|
* 2.2.8 (2021-04-18)
|
||||||
* All remaining functions prefixed with `cell_` or `cells_` have been
|
* All remaining functions prefixed with `cell_` or `cells_` have been
|
||||||
|
6
USAGE.md
6
USAGE.md
@ -297,6 +297,12 @@ bool notcurses_canchangecolor(const struct notcurses* nc);
|
|||||||
// Is our encoding UTF-8? Requires LANG being set to a UTF-8 locale.
|
// Is our encoding UTF-8? Requires LANG being set to a UTF-8 locale.
|
||||||
bool notcurses_canutf8(const struct notcurses* nc);
|
bool notcurses_canutf8(const struct notcurses* nc);
|
||||||
|
|
||||||
|
// Can we reliably use Unicode halfblocks?
|
||||||
|
bool notcurses_canhalfblock(const struct notcurses* nc);
|
||||||
|
|
||||||
|
// Can we reliably use Unicode quadrants?
|
||||||
|
bool notcurses_canquadrant(const struct notcurses* nc);
|
||||||
|
|
||||||
// Can we draw sextants? This requires Unicode 13.
|
// Can we draw sextants? This requires Unicode 13.
|
||||||
bool notcurses_cansextants(const struct notcurses* nc);
|
bool notcurses_cansextants(const struct notcurses* nc);
|
||||||
|
|
||||||
|
@ -26,6 +26,10 @@ notcurses_capabilities - runtime capability detection
|
|||||||
|
|
||||||
**bool notcurses_canutf8(const struct notcurses* ***nc***);**
|
**bool notcurses_canutf8(const struct notcurses* ***nc***);**
|
||||||
|
|
||||||
|
**bool notcurses_canhalfblock(const struct notcurses* ***nc***);**
|
||||||
|
|
||||||
|
**bool notcurses_canquadrant(const struct notcurses* ***nc***);**
|
||||||
|
|
||||||
**bool notcurses_cansextant(const struct notcurses* ***nc***);**
|
**bool notcurses_cansextant(const struct notcurses* ***nc***);**
|
||||||
|
|
||||||
**bool notcurses_canbraille(const struct notcurses* ***nc***);**
|
**bool notcurses_canbraille(const struct notcurses* ***nc***);**
|
||||||
@ -63,10 +67,12 @@ multimedia support capable of decoding videos.
|
|||||||
UTF-8 encoding, and the locale was successfully loaded.
|
UTF-8 encoding, and the locale was successfully loaded.
|
||||||
|
|
||||||
**notcurses_cansextant** returns **true** if the heuristics suggest
|
**notcurses_cansextant** returns **true** if the heuristics suggest
|
||||||
that the terminal can properly render Unicode 13 sextants.
|
that the terminal can properly render Unicode 13 sextants. Likewise,
|
||||||
|
**notcurses_canquadrant** and **notcurses_canhalfblock** return **true**
|
||||||
**notcurses_canbraille** returns **true** if Braille is expected to work on the
|
if the heuristics suggest that the terminal can properly render Unicode
|
||||||
terminal.
|
quadrants and halfblocks, respectively. **notcurses_canbraille** returns
|
||||||
|
**true** if Unicode Braille is expected to work on the terminal. None of
|
||||||
|
these functions return **true** unless UTF-8 encoding is in use.
|
||||||
|
|
||||||
**notcurses_check_pixel_support** returns 1 if bitmap support (via any
|
**notcurses_check_pixel_support** returns 1 if bitmap support (via any
|
||||||
mechanism) is detected; **NCBLIT_PIXEL** can be used after such a return.
|
mechanism) is detected; **NCBLIT_PIXEL** can be used after such a return.
|
||||||
|
@ -1262,6 +1262,12 @@ API bool notcurses_canopen_videos(const struct notcurses* nc);
|
|||||||
// Is our encoding UTF-8? Requires LANG being set to a UTF8 locale.
|
// Is our encoding UTF-8? Requires LANG being set to a UTF8 locale.
|
||||||
API bool notcurses_canutf8(const struct notcurses* nc);
|
API bool notcurses_canutf8(const struct notcurses* nc);
|
||||||
|
|
||||||
|
// Can we reliably use Unicode halfblocks?
|
||||||
|
API bool notcurses_canhalfblock(const struct notcurses* nc);
|
||||||
|
|
||||||
|
// Can we reliably use Unicode quadrants?
|
||||||
|
API bool notcurses_canquadrant(const struct notcurses* nc);
|
||||||
|
|
||||||
// Can we reliably use Unicode 13 sextants?
|
// Can we reliably use Unicode 13 sextants?
|
||||||
API bool notcurses_cansextant(const struct notcurses* nc);
|
API bool notcurses_cansextant(const struct notcurses* nc);
|
||||||
|
|
||||||
|
@ -2047,6 +2047,14 @@ bool notcurses_canutf8(const notcurses* nc){
|
|||||||
return nc->tcache.utf8;
|
return nc->tcache.utf8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool notcurses_canhalfblock(const notcurses* nc){
|
||||||
|
return nc->tcache.utf8;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool notcurses_canquadrant(const notcurses* nc){
|
||||||
|
return nc->tcache.quadrants && nc->tcache.utf8;
|
||||||
|
}
|
||||||
|
|
||||||
bool notcurses_cansextant(const notcurses* nc){
|
bool notcurses_cansextant(const notcurses* nc){
|
||||||
return nc->tcache.sextants && nc->tcache.utf8;
|
return nc->tcache.sextants && nc->tcache.utf8;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user