Skip to content

bfu_ua_display: Add Ukrainian text rendering library#1114

Open
BrainFromUkraine wants to merge 2 commits into
micropython:masterfrom
BrainFromUkraine:add-bfu-ua-display
Open

bfu_ua_display: Add Ukrainian text rendering library#1114
BrainFromUkraine wants to merge 2 commits into
micropython:masterfrom
BrainFromUkraine:add-bfu-ua-display

Conversation

@BrainFromUkraine
Copy link
Copy Markdown

Add bfu_ua_display package for rendering Ukrainian text on MicroPython displays.

Features:

  • Full Ukrainian alphabet support (33 letters)
  • 5x7 bitmap font optimized for ESP32
  • Works with any display supporting pixel() method
  • Tested with SSD1306 OLED displays

Package provides ua_text, ua_text_center, and ua_text_scaled functions.

@BrainFromUkraine BrainFromUkraine force-pushed the add-bfu-ua-display branch 5 times, most recently from 758de50 to 32cd805 Compare May 13, 2026 20:37
Add bfu_ua_display package for rendering Ukrainian text on
MicroPython displays.

Features:

* Full Ukrainian alphabet support.
* 5x7 bitmap font optimized for ESP32.
* Works with displays supporting pixel() method.
* Tested with SSD1306 OLED displays.

Package provides ua_text, ua_text_center, and ua_text_scaled.

Signed-off-by: Oleksandr Polishchuk <oleksandr.polishchuk@icloud.com>
@Josverl
Copy link
Copy Markdown
Contributor

Josverl commented May 14, 2026

Дякую for the contribution.

A few initial comments:
With regards to location I think it should be in the python-ecosys/ folder as it is not part of the MicroPython firmware.
That would still allow it to be directly used by custom firmware.

Also on a first look the PR appears to be created using AI.
while the PR template in this repo does not (yet) explicitly ask this question, the contributor guidelines still apply.
I kindly ask you to add that to the initial PR comment to clarify that.

For more information, consult the MicroPython Generative AI Policy:
https://github.com/micropython/micropython/wiki/ContributorGuidelines#generative-ai-policy

Signed-off-by: Oleksandr Polishchuk <oleksandr.polishchuk@icloud.com>
@BrainFromUkraine
Copy link
Copy Markdown
Author

Thank you for the review and feedback.

I've moved the package from micropython/bfu_ua_display to python-ecosys/bfu_ua_display as requested.

All related files were relocated while keeping the public API and functionality unchanged. All formatting, linting, and CI checks are now passing successfully.

I also want to clarify that AI tools were used during development and documentation assistance for this contribution, while the implementation, testing, fixes, and final review were performed manually.

Thanks again for the guidance and review.

@Josverl
Copy link
Copy Markdown
Contributor

Josverl commented May 15, 2026

Thanks for clarifying.

Have you considered an optional framebuffer fast path for framebuffer-backed drivers?

Right now rendering is per-glyph/per-pixel via pixel() (and fill_rect() for scaled text), which is nicely portable.
However on common ESP32 display stacks a framebuf/blit path could reduce Python call overhead and make scaled or repeated text rendering significantly faster while keeping the existing pixel() fallback.

@BrainFromUkraine
Copy link
Copy Markdown
Author

Thanks for the suggestion.

Yes, I have considered framebuffer-backed rendering paths as a possible future optimization, especially for ESP32 display stacks using framebuf/blit operations.

The current implementation intentionally prioritizes portability and compatibility across different MicroPython display drivers by relying on the generic pixel() fallback path.

I agree that an optional framebuffer/blit accelerated path could significantly reduce Python call overhead and improve rendering performance for scaled or repeated text rendering.

I’ll definitely explore this direction further while keeping compatibility with existing drivers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants