View Single Post
Old 06-10-2018, 08:50 PM   #1
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Post FBInk: A small tool/library to print crap on your screen!

The lack of a small utility to print messages and images on screen (àla eips on Kindles) has been bugging me (and others, hi @frostschutz! ) for *quite* a while... So, I finally caved, and spent a few days working on this...

So here comes FBInk.
Basically, you feed it a string & a position on screen (row/column), and it'll print it there. Voilà.
There's a few helper flags if you want automagic padding, centering, or both, and it should break long strings over multiple-lines automatically (albeit in the dumbest fashion possible, no hyphenation, that's way out of scope here).

It has zero dependency besides the libc, since it's basically drawing monospaced monochrome glyphs straight to the framebuffer.

It's available as a standalone utility, which includes some of eips's more obscure features (like the ability to trigger specific mxcfb refresh calls without touching the fb at all), and as a C library, which is how I'm using it in KFMon.

Bindings are also available in Go, LuaJIT & Python .

Since v1.2.0, it can also display images, in the most common range of formats, with or without transparency .

Since v1.8.0, thanks to @sherman, it can also render OpenType/TrueType fonts .

NOTE: Up to date binaries (as well as Python bindings) are also always available in KoboStuff.
Attached Files
File Type: zip FBInk-v1.25.0.zip (565.2 KB, 292 views)

Last edited by NiLuJe; 12-05-2022 at 03:01 PM. Reason: Bump to 1.25.0
NiLuJe is offline   Reply With Quote