mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
readme: note that some terminals draw block chars directly
This commit is contained in:
parent
f3688f44fb
commit
b9ae0eee8c
23
README.md
23
README.md
@ -276,7 +276,7 @@ and background indices into said table. That'll work for the duration of a
|
|||||||
porting effort, certainly.
|
porting effort, certainly.
|
||||||
|
|
||||||
I have adapted two large (~5k lines of C UI code each) programs from NCURSES to
|
I have adapted two large (~5k lines of C UI code each) programs from NCURSES to
|
||||||
notcurses, and found it a fairly painless process. It was helpful to introduce
|
Notcurses, and found it a fairly painless process. It was helpful to introduce
|
||||||
a shim layer, e.g. `compat_mvwprintw` for NCURSES's `mvwprintw`:
|
a shim layer, e.g. `compat_mvwprintw` for NCURSES's `mvwprintw`:
|
||||||
|
|
||||||
```c
|
```c
|
||||||
@ -326,21 +326,24 @@ These are pretty obvious, implementation-wise.
|
|||||||
|
|
||||||
### TrueColor detection
|
### TrueColor detection
|
||||||
|
|
||||||
notcurses aims to use only information found in the terminal's terminfo entry to detect capabilities, TrueColor
|
Notcurses primarily loads control sequences from `terminfo(5)`, using the
|
||||||
being one of them. Support for this is indicated by terminfo having a flag, added in NCURSES 6.1, named `RGB` set
|
database entry specified by the `TERM` environment variable. 24-bit "TrueColor"
|
||||||
to `true`. However, as of today there are few and far between terminfo entries which have the capability in their
|
color support (or at least the ability to specify 3 8-bit channels as arguments
|
||||||
database entry and so TrueColor won't be used in most cases. Terminal emulators have had for years a kludge to
|
to `setaf` and `setbf`) is indicated by the `rgb` terminfo capability. Many
|
||||||
work around this limitation of terminfo in the form of the `COLORTERM` environment variable which, if set to either
|
terminals with RGB support do not advertise the `rgb` capability. If you
|
||||||
`truecolor` or `24bit` does the job of indicating the capability of sending the escapes 48 and 38 together with a
|
believe your terminal to support 24-bit TrueColor, this can be indicated by
|
||||||
tripartite RGB (0 ≤ c ≤ 255 for all three components) to specify fore- and background colors.
|
exporting the `COLORTERM` environment variable as `truecolor` or `24bit`.
|
||||||
Checking for `COLORTERM` admittedly goes against the goal stated at the top of this section but, for all practical
|
Note that some terminals accept a 24-bit specification, but map it down to
|
||||||
purposes, makes the detection work quite well **today**.
|
fewer colors.
|
||||||
|
|
||||||
### Fonts
|
### Fonts
|
||||||
|
|
||||||
Fonts end up being a whole thing, little of which is pleasant. I'll write this
|
Fonts end up being a whole thing, little of which is pleasant. I'll write this
|
||||||
up someday **FIXME**.
|
up someday **FIXME**.
|
||||||
|
|
||||||
|
It is worth knowing that several terminals draw the block characters directly,
|
||||||
|
rather than loading them from a font.
|
||||||
|
|
||||||
### FAQs
|
### FAQs
|
||||||
|
|
||||||
If things break or seem otherwise lackluster, **please** consult the
|
If things break or seem otherwise lackluster, **please** consult the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user