Go to file
2023-10-24 06:02:33 +02:00
backends backends/fb: Automatically scale font for bigger displays 2023-10-24 06:02:33 +02:00
flanterm.c Minor style adjustments 2023-06-10 17:41:04 +02:00
flanterm.h Drop in_bootloader 2023-03-30 01:15:41 +02:00
LICENSE Rebrand to Flanterm 2023-03-29 22:37:05 +02:00
README.md Add flanterm_fb_simple_init() and add basic usage to README 2023-07-07 18:25:04 +02:00

Flanterm

Flanterm is a fast and reasonably complete terminal emulator with support for multiple output backends. Included is a fast framebuffer backend.

Quick usage

To quickly set up and use a framebuffer Flanterm instance, it is possible to use the flanterm_fb_simple_init() function as such:

#include <flanterm/flanterm.h>
#include <flanterm/backends/fb.h>

struct flanterm_context *ft_ctx = flanterm_fb_simple_init(
    framebuffer_ptr, framebuffer_width, framebuffer_height, framebuffer_pitch
);

Where framebuffer_{ptr,width,height,pitch} represent the corresponding info about the framebuffer to use for this given instance.

To then print to the terminal instance, simply use the flanterm_write() function on the given instance. For example:

#include <flanterm/flanterm.h>

const char msg[] = "Hello world\n";

flanterm_write(ft_ctx, msg, sizeof(msg));