[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libcaca] experimental ncurses driver patch: dynamic color changes/palette simulation, and support for some non-UTF-8 locales under glibc

I've made an experimental patch to the ncurses driver to:

(a) use dynamic color changes ["xterm-256color", "linux", and similar
terminals]/palette simulation["screen-256color" and similar] to
approximate the cucul palette more accurately (which improves the
performance of dithers and other "truecolor" operations, although it
does not provide actual truecolor support due to 256-color-pair
limitation in ncurses), and

(b) support some non-UTF-8 locales under glibc by using wchar_t output
routines (ncursesw only)


future: find some way to work around bugs in experimental ncurses "ABI
6" which is supposed to provide >256 color pair support, but i have
not made it work yet.

Also, with some kind of palette optimisation (I haven't read the
S/Lang driver code yet) this could be changed to dynamically change
the palette/color pair allocation to always keep the "best" 256 color
pairs visible for the canvas being rendered. Maybe sam's study will
help with that?

Anyhow, I would love to hear your feedback.


p.s. I updated the a few minutes ago at the same URL. if you fetched
it before, re-fetch for a less buggy version.

Attachment: caca-256color.diff
Description: Binary data