mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 09:09:03 -04:00
always enable 8bpc RGB for kitty, alacritty, and foot #1641
This commit is contained in:
parent
f91ffae773
commit
014a88a09c
3
NEWS.md
3
NEWS.md
@ -9,6 +9,9 @@ rearrangements of Notcurses.
|
||||
that they will be reported by `ncplane_at_yx()`). Since no method currently
|
||||
exists to destroy a sprixel without destroying its plane, I don't think
|
||||
this will impact anyone.
|
||||
* 8bpc RGB is unconditionally enabled if the terminal emulator is determined
|
||||
to be Kitty, Alacritty, or foot; there is no longer any need to export
|
||||
`COLORTERM` on these terminals.
|
||||
* Add `NCSCALE_INFLATE`.
|
||||
|
||||
* 2.3.0 (2021-05-09) **"Triumph"**
|
||||
|
@ -193,6 +193,8 @@ exporting the `COLORTERM` environment variable as `truecolor` or `24bit`.
|
||||
Note that some terminals accept a 24-bit specification, but map it down to
|
||||
fewer colors.
|
||||
|
||||
Since 2.3.1, 8bpc RGB is always enabled for Kitty, Alacritty, and foot.
|
||||
|
||||
### Fonts
|
||||
|
||||
Fonts end up being a whole thing, little of which is pleasant. I'll write this
|
||||
|
@ -172,6 +172,8 @@ implementing `rgb` use the 3x8bpc model; XTerm for instance:
|
||||
Thus emitting `setaf` with an RGB value close to black can result, when
|
||||
using `xterm-direct`'s `setaf` and `rgb` definitions, in a bright ANSI color.
|
||||
|
||||
Since 2.3.1, DirectColor is always enabled for Kitty, Alacritty, and foot.
|
||||
|
||||
## Problematic characters
|
||||
|
||||
Some characters seem to cause problems with one terminal or another. These
|
||||
|
@ -92,17 +92,20 @@ apply_term_heuristics(tinfo* ti, const char* termname, int fd){
|
||||
ti->quadrants = true;
|
||||
ti->pixel_query_done = true;
|
||||
ti->bitmap_supported = true;
|
||||
ti->RGBflag = true;
|
||||
setup_kitty_bitmaps(ti, fd);
|
||||
}else if(strstr(termname, "alacritty")){
|
||||
ti->alacritty_sixel_hack = true;
|
||||
ti->quadrants = true;
|
||||
// ti->sextants = true; // alacritty https://github.com/alacritty/alacritty/issues/4409 */
|
||||
ti->RGBflag = true;
|
||||
}else if(strstr(termname, "vte") || strstr(termname, "gnome") || strstr(termname, "xfce")){
|
||||
ti->sextants = true; // VTE has long enjoyed good sextant support
|
||||
ti->quadrants = true;
|
||||
}else if(strncmp(termname, "foot", 4) == 0){
|
||||
ti->sextants = true;
|
||||
ti->quadrants = true;
|
||||
ti->RGBflag = true;
|
||||
}else if(strncmp(termname, "st", 2) == 0){
|
||||
// st had neithersextants nor quadrants last i checked (0.8.4)
|
||||
}else if(strstr(termname, "mlterm")){
|
||||
@ -140,6 +143,9 @@ void free_terminfo_cache(tinfo* ti){
|
||||
int interrogate_terminfo(tinfo* ti, int fd, const char* termname, unsigned utf8){
|
||||
memset(ti, 0, sizeof(*ti));
|
||||
ti->utf8 = utf8;
|
||||
// allow the "rgb" boolean terminfo capability, a COLORTERM environment
|
||||
// variable of either "truecolor" or "24bit", or unconditionally enable it
|
||||
// for several terminals known to always support 8bpc rgb setaf/setab.
|
||||
ti->RGBflag = query_rgb();
|
||||
int colors = tigetnum("colors");
|
||||
if(colors <= 0){
|
||||
|
Loading…
x
Reference in New Issue
Block a user