Platforms
A platform in Lopaka is the target drawing library or runtime that receives the generated code. Selecting a platform does three things:
- Constrains the editor to the color model and fonts the target library understands.
- Drives the code generator — each platform produces its own syntax and declarations.
- Determines which code settings are available (wrapper function, variable declarations, image export format, etc.).
The platform is chosen when you create a project and cannot be changed afterwards: Project settings shows it read-only. To target another library, create a new project with that platform.
Choosing a platform
- OLED / monochrome LCD (SSD1306, SH1106, SSD1309) — U8g2 or AdafruitGFX Mono
- Color TFT (ILI9341, ST7789, GC9A01) — TFT_eSPI, ArduinoGFX, or AdafruitGFX Color
- Rich touch UI on ESP32/STM32 — LVGL
- Flipper Zero / One — Flipper platform
- ESPHome smart home device — ESPHome
- E-paper display — GxEPD2
- RP2040 / ESP32 with MicroPython — MicroPython
- CircuitPython board — CircuitPython
- Mockup or export image only — Free Drawing
Platform comparison
| Platform | Output | Color model | Fonts | Images |
|---|---|---|---|---|
| U8g2 | C / C++ | Monochrome (1-bit) | BDF (large set) | XBMP |
| TFT_eSPI / M5 / Lovyan | C++ | RGB565 | GFX | XBMP, RGB565 |
| AdafruitGFX Color | C++ | RGB565 | GFX | XBMP, RGB565 |
| AdafruitGFX Mono | C++ | Monochrome (1-bit) | GFX | XBMP |
| ArduinoGFX | C++ | RGB565 | GFX | XBMP, RGB565 |
| LVGL | C | RGB + alpha | Montserrat (TTF) | RGB565 |
| Flipper Zero / One | C | Monochrome (1-bit) | 4 fixed fonts | XBMP |
| ESPHome | YAML + C++ lambda | RGB | Google Fonts (TTF) | XBMP |
| MicroPython | Python | Monochrome (1-bit) | Fixed (Petme 8×8) | Raw buffer |
| CircuitPython | Python | RGB | Terminus (BDF) | Raw buffer |
| GxEPD2 | C++ | Indexed palette | GFX | XBMP |
| Free Drawing | — | RGB | All fonts | — |
Drawing tools
Which tools appear in the toolbar depends on the active platform. LVGL gets a widget-based set; all other platforms share a primitive drawing set with minor variations.
| Tool | U8g2 | TFT_eSPI | AdaGFX | AdaMono | ArduGFX | LVGL | Flipper | ESPHome | µPy | CPy | GxEPD2 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Line | ✅ | ✅ | ✅ | ✅ | ✅ | — | ✅ | ✅ | ✅ | ✅ | ✅ |
| Rectangle | ✅ | ✅ | ✅ | ✅ | ✅ | — | ✅ | ✅ | ✅ | ✅ | ✅ |
| Circle | — | — | ✅ | ✅ | — | — | ✅ | ✅ | — | ✅ | ✅ |
| Ellipse | ✅ | ✅ | — | — | ✅ | — | — | — | ✅ | — | — |
| Triangle | ✅ | ✅ | ✅ | ✅ | ✅ | — | — | ✅ | ✅ | ✅ | ✅ |
| Polygon | ✅ | ✅ | ✅ | ✅ | ✅ | — | ✅ | ✅ | ✅ | ✅ | — |
| Arc | — | ✅ | — | — | — | — | — | — | — | — | — |
| Arc LVGL | — | — | — | — | — | ✅ | — | — | — | — | — |
| Text | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Paint | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Panel | — | — | — | — | — | ✅ | — | — | — | — | — |
| Button | — | — | — | — | — | ✅ | — | — | — | — | — |
| Slider | — | — | — | — | — | ✅ | — | — | — | — | — |
| Switch | — | — | — | — | — | ✅ | — | — | — | — | — |
| Checkbox | — | — | — | — | — | ✅ | — | — | — | — | — |
| Text Area | — | — | — | — | — | ✅ | — | — | — | — | — |
Text rotation
U8g2, Flipper Zero / One, CircuitPython, and LVGL support native text rotation by 0°, 90°, 180°, or 270°. Select a text layer and use the rotation buttons in the Inspector.
Platforms
U8g2
Targets the U8g2 monochrome display library. Generates C++ (Arduino) or C (ESP-IDF) code.
For a complete setup and integration walkthrough, see the U8g2 guide.
Color: Binary — white (1) or black (0). Inverted-color mode available.
Fonts: Large BDF font library included. Font names compile to u8g2_font_<name>_tr.
Images: XBMP bitmaps declared as image_<Name>_bits arrays (U8X8_PROGMEM on Arduino), or extracted into a downloaded .h asset file.
Animations: Built-in monochrome animations are supported.
Templates: Arduino (C++) and ESP-IDF (C) — each with a progmem toggle.
Inspector: Color picker is hidden — color is always binary (set by fill/invert logic, not a color field). Triangle layers follow the U8g2 primitive and are always filled, so no fill toggle is shown for them.
Limitations: No RGB. No custom font sizes — font size is determined by the BDF file.
TFT_eSPI / M5 / Lovyan
Covers TFT_eSPI, M5Stack GFX, and LovyanGFX — all share the same API surface.
For a complete setup and integration walkthrough, see the TFT_eSPI guide.
Color: Full RGB, packed as RGB565 (0xRRGG).
Fonts: Adafruit built-in plus GFX fonts. Custom TrueType (.ttf, .otf, .woff) and BDF fonts can be uploaded and are converted to GFX format on import.
Images: XBMP (1-bit) or RGB565 pixel arrays (image_<Name>_bits / image_<Name>_pixels), inline or as downloaded .h asset files. Transparent pixels are filled with the screen background unless the image's Transparency option is on; then a one-bit mask keeps them see-through (tft.pushMaskedImage).
Arcs: The Arc tool generates TFT_eSPI-style arcs with foreground and background colors, configurable angles and width, and optional smooth edges.
Templates: Arduino (C++) or ESP-IDF (C++). The ESP-IDF template drops PROGMEM, millis() and setup() / loop() and times animations with esp_timer_get_time().
Limitations: RGB565 only — no partial alpha: a transparent pixel is either fully see-through (with Transparency on) or filled. GFX font y-position is adjusted automatically; verify alignment when using multiple fonts.
AdafruitGFX Color
Targets Adafruit GFX Library on color displays.
Color: RGB565.
Fonts: Adafruit built-in plus GFX fonts. Custom TrueType (.ttf, .otf, .woff) and BDF fonts can be uploaded and are converted to GFX format on import.
Images: XBMP or RGB565 pixel arrays (image_<Name>_bits / image_<Name>_pixels), inline or as downloaded .h asset files. Transparent pixels are filled with the screen background unless the image's Transparency option is on; then a one-bit mask keeps them see-through (drawRGBBitmap with a mask).
Animations: Built-in monochrome animations are supported.
Templates: Arduino (C++) or ESP-IDF (C++). The ESP-IDF template drops PROGMEM, millis() and setup() / loop() and times animations with esp_timer_get_time().
Limitations: Duplicate font declarations are not de-duplicated — check the output if you use the same font on many layers.
AdafruitGFX Mono
Same as AdafruitGFX Color but for monochrome OLED/LCD displays (SSD1306, SH1106, etc.).
Color: Binary — 1 (white) or 0 (black). Palette is fixed to #000000 / #ffffff.
Fonts: Same GFX font library as AdafruitGFX Color
Screen clear: Calls clearDisplay() instead of fillScreen().
Animations: Built-in monochrome animations are supported.
Templates: Arduino (C++) or ESP-IDF (C++). The ESP-IDF template drops PROGMEM, millis() and setup() / loop() and times animations with esp_timer_get_time().
Limitations: No RGB. No grayscale.
ArduinoGFX
Targets Arduino_GFX.
Color: RGB565, high-byte-first encoding (differs from Adafruit's low-byte order).
Fonts: Adafruit built-in plus GFX fonts with custom scale factor. Custom TrueType (.ttf, .otf, .woff) and BDF fonts can be uploaded and are converted to GFX format on import.
Images: XBMP or RGB565 pixel arrays (image_<Name>_bits / image_<Name>_pixels), inline or as downloaded .h asset files. Transparent pixels are filled with the screen background unless the image's Transparency option is on; then a one-bit mask keeps them see-through (draw16bitRGBBitmapWithMask).
Templates: Arduino (C++) or ESP-IDF (C++). The ESP-IDF template drops PROGMEM, millis() and setup() / loop() and times animations with esp_timer_get_time().
Limitations: Same RGB565 constraints as TFT_eSPI. Byte order mismatch with Adafruit will produce wrong colors if you copy bitmaps between the two platforms.
LVGL
Targets LVGL — a feature-rich embedded GUI library.
Color: Full RGB. RGB images keep their transparent pixels through an alpha plane (RGB565A8) when the image's Transparency option is on. Colors are encoded as lv_color_hex(0xRRGGBB).
Fonts: Montserrat TTF at arbitrary sizes.
Widgets: Supports panels, buttons, sliders, switches, checkboxes, text areas, and Arc LVGL widgets in addition to primitive shapes. Widget defaults (radius, border, background color) match LVGL v9 defaults.
Renderer: Uses smooth (anti-aliased) canvas rendering in the editor to approximate LVGL's output.
Images: RGB565 image descriptors (lv_image_dsc_t) compatible to v9, downloadable as a <Name>.c asset file.
Limitations:
- Only Montserrat is available in the font picker
- Custom widgets are not supported — each layer maps to a single
lv_obj_createcall - Generated code targets the LVGL C API (v9)
Flipper Zero / One
Targets the Flipper Zero and Flipper One GUI canvas API (canvas_draw_*).
Color: Monochrome. Default draw color is black on orange background in the editor.
Fonts: Four fixed fonts only — FontPrimary (Helvetica 8 bold), FontSecondary (Haxrcorp 4089), FontKeyboard (ProFont 11), FontBigNumbers (ProFont 22). No custom font sizes.
Display presets: Zero Horizontal (128×64), Zero Vertical (64×128), One Horizontal (256×144), One Vertical (144×256).
Images: XBMP bitmaps (image_<Name>_bits), inline or as a standalone downloaded .h asset file with uint8_t arrays.
Animations: Built-in and imported monochrome animations are supported. Generated output includes playback helpers and downloadable C headers containing the XBM frames.
Limitations:
- Monochrome
- No custom fonts
ESPHome
Targets the ESPHome display component lambda.
For a full walkthrough from design to flashing, see the ESPHome guide.
Output: YAML with embedded C++ lambdas. Ace editor uses YAML syntax highlighting.
Color: Full RGB encoded as Color(R, G, B).
Fonts: Google Fonts via gfonts:// and other TTF fonts. Font declarations go into the top-level font: YAML key.
Images: Downloadable PNG assets (<Name>.png) referenced by the YAML as images/<Name>.png and declared as BINARY images. Place the PNG files in an images/ folder next to the YAML.
No round corners: ESPHome's display API has no rounded-rectangle primitive.
Limitations: XBMP only — no RGB bitmap export. font: and image: blocks must be at the root of the YAML, not inside the lambda: string.
MicroPython
Targets MicroPython's framebuf module on RP2040, ESP32, and similar.
Driver: the generated code expects the PerfecXX MicroPython-SSD1306 driver, whose display object exposes its framebuffer as display.framebuf and adds display.polygon. Ellipses are drawn with display.framebuf.ellipse(...), so the editor preview matches the device pixel for pixel. The standard micropython-lib ssd1306.py has no display.framebuf and fails on ellipses, triangles and polygons.
Output: Python. Ace editor uses Python syntax highlighting.
Color: Monochrome — 1 (white) or 0 (black). Palette is fixed to black and white.
Fonts: A single built-in font (Petme 8×8). Font picker is not available.
Images: Raw bytearray buffers (packed 1-bit, row-major), or a downloadable .pbm asset (image_<Name>_bits.pbm) that Include image files loads at startup.
Limitations:
- Monochrome
- Only the built-in Petme 8×8 font is available
- Round corners not supported
- Limited drawing primitives compared to other platforms.
- Triangls are outline-only.
CircuitPython
Targets CircuitPython's displayio and vectorio stack.
Output: Python. Ace editor uses Python syntax highlighting.
Color: RGB, encoded as 24-bit hex (0xRRGGBB).
Fonts: Terminus BDF font included. Font picker is not shown in the UI — font choice is fixed.
Images: displayio.OnDiskBitmap assets (image_<Name>_bits.bmp) loaded from the device filesystem.
Limitations:
- font is fixed to Terminus BDF
- Image pixels live in the downloaded
.bmpfiles — copy them next to your code
GxEPD2
Targets the GxEPD2 e-paper display library. Extends AdafruitGFX.
Color: Indexed palette of 9 named constants — GxEPD_BLACK, GxEPD_WHITE, GxEPD_DARKGREY, GxEPD_LIGHTGREY, GxEPD_RED, GxEPD_YELLOW, GxEPD_BLUE, GxEPD_GREEN, GxEPD_ORANGE. Colors outside this palette map to GxEPD_BLACK.
Fonts: Adafruit built-in plus GFX fonts (inherits from Adafruit platform). Custom TrueType (.ttf, .otf, .woff) and BDF fonts can be uploaded and are converted to GFX format on import.
Images: XBMP only, downloadable as a .h asset file.
Background: Light grey (#f8f8f8) editor background to approximate e-paper white.
Limitations: Palette is fixed — no arbitrary hex colors. Partial refresh and update modes are not modelled in the editor.
Free Drawing
A design-only mode with no code export. Useful for mockups and sharing designs without targeting a specific library.
Color: Full RGB.
Fonts: All TTF, BDF, and GFX fonts are available.
Code: No output. The code panel is empty.
Limitations: Cannot be used for code generation. No import support.