View Single Post
Old 01-16-2019, 11:47 AM   #2
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: 8,619
Karma: 12901212
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O & Forma
A few things:

* You'll probably never be able to get the info you want from outside the framework itself. Which pretty much makes this whole thing impossible.

* As for FBInk, I have a vague inkling why you're trying to use the TTF codepath while never actually really printing "text", but it probably wouldn't be portable.

The internal API has rectangle drawing helpers, but they're not exposed.
For something like this, I'd simply draw an "image" (i.e., a simple w*h array, as 1px = 1byte) myself and print that via the raw printing feature (you can get the screen dimensions via FBInk, c.f. -e & get_state).
Pro: That'll save you the seven million refreshes you're currently not inhibiting (-b) .
Con: That's an API-only feature, meaning no shell .

(As for 2., that's a quirk of the linebreaking feature, a string composed only of a single space is probably considered as a viable break-point, which makes it zero-width).

Last edited by NiLuJe; 01-16-2019 at 11:53 AM.
NiLuJe is offline   Reply With Quote