After understanding ab_glyph a little better, I can now understand why it would just be better to use cosmic-text, as it is far more powerful. Even though it is designed for RGBA displays, it doesn't produce RGBA sprites directly. Instead, in the "f" closure argument to draw you can handle the "color" argument however you wish (i.e. discard or combine components to yield monochrome). #eink #einkcyberdeck #rustlang
https://pop-os.github.io/cosmic-text/cosmic_text/struct.Buffer.html#method.draw
Buffer in cosmic_text - Rust

A buffer of text that is shaped and laid out

Today in terrible ideas: You can use ab_glyph_rasterizer's Rasterizer directly to draw polygons. You have to keep in mind, however, that ab_glyph cannot draw "lines" (stroked lines), only filled shapes, because fonts don't use stroked lines. Also it will iterate over every pixel of the area you specify, even if there is nothing to be drawn there. Of course a lot of this can be avoided by using the higher-level Outline object instead. #rustlang #einkcyberdeck https://docs.rs/ab_glyph_rasterizer/0.1.8/ab_glyph_rasterizer/struct.Rasterizer.html
Rasterizer in ab_glyph_rasterizer - Rust

Coverage rasterizer for lines, quadratic & cubic beziers.

So on my #einkcyberdeck I want to be able to use Firefox. But I want to use it in the most efficient way possible (running headless). That's why I've been looking at the #browsh project because they are doing something similar (using Firefox in marionette headless mode). My needs are actually a lot simpler than theirs, because I don't need to extract the text or deal with simulating graphics. https://github.com/browsh-org/browsh
GitHub - browsh-org/browsh: A fully-modern text-based browser, rendering to TTY and browsers

A fully-modern text-based browser, rendering to TTY and browsers - browsh-org/browsh

GitHub
I am working on designing an #einkcyberdeck because I enjoy failing at personal projects which are entirely too ambitious and which I don't have anywhere near enough time to work on.   đŸ™ƒ
agui *might* work, as it is not tightly bound to a particular renderer, but:
- there's a big warning on the repo saying its not in a usable state
- unlike ab_glyph and plotters, which only require draw_pixel, and have default implementations for everything above that, agui assumes a capable canvas backend, such as vello. #einkcyberdeck
https://github.com/Stumblinbear/agui
GitHub - Stumblinbear/agui: An advanced, reactive UI library for Rust

An advanced, reactive UI library for Rust. Contribute to Stumblinbear/agui development by creating an account on GitHub.

GitHub
Looking for a Rust GUI library for my #einkcyberdeck is not fun. Many of them are optimized either for GPU or for web, neither of which is a good fit when I need to be able to implement a custom rasterizer to avoid conversion from RGBA to monochrome. So far ab_glyph and plotters are good fits in terms of custom rasterizer but neither is a GUI library by any stretch of the imagination.
Today in my ongoing saga of a #einkcyberdeck: I've discovered that #rust #plotters is fully backend agnostic, which would allow me to use it to plot directly to the e-ink native image buffer by implementing the DrawingBackend trait:
https://github.com/plotters-rs/plotters/blob/7c1f8ec41ae9e70b91c3427bd19c929ac45fb31d/plotters-backend/src/lib.rs#L106
plotters/plotters-backend/src/lib.rs at 7c1f8ec41ae9e70b91c3427bd19c929ac45fb31d · plotters-rs/plotters

A rust drawing library for high quality data plotting for both WASM and native, statically and realtimely 🩀 📈🚀 - plotters-rs/plotters

GitHub