tinygo-org / drivers

TinyGo drivers for sensors, displays, wireless adaptors, and other devices that use I2C, SPI, GPIO, ADC, and UART interfaces.
https://tinygo.org
BSD 3-Clause "New" or "Revised" License
608 stars 192 forks source link

Add textarea package #528

Closed osechet closed 1 year ago

osechet commented 1 year ago

Hi, This PR adds a textarea package with a TextArea structure to simplify printing text on any Displayer. I'm not totally sure if it belongs in the drivers repo since it isn't really a driver. It provides a simple font library and uses the Displayer's SetPixel() method to print the characters as described by the font. For the moment only one 6x8 font is provided but more could be added. An example is available in the examples/textarea directory, using a ili9341 driver. I only tested the code with that driver.

deadprogram commented 1 year ago

@osechet have you seen https://github.com/tinygo-org/tinyfont by any chance?

aykevl commented 1 year ago

Yeah, I also think this doesn't quite belong in the drivers repo. Either in tinyfont, or in a separate drawing/gfx package.

deadprogram commented 1 year ago

Closing, please take a look at the feedback and decide how best to handle. Thanks @osechet