8.12. `libcaca` – Color ASCII Art library
Prev | Chapter 8. Video output devices | Next

## 8.12. `libcaca` – Color ASCII Art library

The `libcaca` library is a graphics library that outputs text instead of pixels, so that it can work on older video cards or text terminals. It is not unlike the famous `AAlib` library. `libcaca` needs a terminal to work, thus it should work on all Unix systems (including Mac OS X) using either the `slang` library or the `ncurses` library, on DOS using the `conio.h` library, and on Windows systems using either `slang` or `ncurses` (through Cygwin emulation) or `conio.h`. If `./configure` detects `libcaca`, the caca libvo driver will be built.

The differences with `AAlib` are the following:

- 16 available colors for character output (256 color pairs)

- color image dithering

But `libcaca` also has the following limitations:

- no support for brightness, contrast, gamma

You can use some keys in the caca window to change rendering options:

Key | Action
--- | ---
d | Toggle `libcaca` dithering methods.
a | Toggle `libcaca` antialiasing.
b | Toggle `libcaca` background.

`libcaca` will also look for certain environment variables:

`CACA_DRIVER`

  Set recommended caca driver. e.g. ncurses, slang, x11.

`CACA_GEOMETRY (X11 only)`

  Specifies the number of rows and columns. e.g. 128x50.

`CACA_FONT (X11 only)`

  Specifies the font to use. e.g. fixed, nexus.

Use the `-framedrop` option if your computer is not fast enough to render all frames.

Prev | Up | Next
8.11. AAlib – text mode displaying | Home | 8.13. VESA - output to VESA BIOS