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.).
Switching platforms on an existing project rewrites the entire generated code block. Layer geometry is preserved; colors are remapped to the new color model.
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 | ✅ | ✅ | ✅ | ✅ | ✅ | — | ✅ | ✅ | ✅ | ✅ | — |
| Text | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Paint | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Panel | — | — | — | — | — | ✅ | — | — | — | — | — |
| Button | — | — | — | — | — | ✅ | — | — | — | — | — |
| Slider | — | — | — | — | — | ✅ | — | — | — | — | — |
| Switch | — | — | — | — | — | ✅ | — | — | — | — | — |
| Checkbox | — | — | — | — | — | ✅ | — | — | — | — | — |
| Text Area | — | — | — | — | — | ✅ | — | — | — | — | — |
Platforms
U8g2
Targets the U8g2 monochrome display library. Generates C++ (Arduino) or C (ESP-IDF) code.
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 uint8_t arrays in PROGMEM.
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).
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.
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. Alpha channel is composited against the screen background before encoding.
Limitations: RGB565 only — no alpha in the output. 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.
Limitations: No alpha channel. 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().
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.
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 with alpha channel support. Colors are encoded as lv_color_hex(0xRRGGBB).
Fonts: Montserrat TTF at arbitrary sizes.
Widgets: Supports panels, buttons, sliders, switches, checkboxes, and text areas 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_img_dsc_t) compatible to v9
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.
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: XBMP exported as BINARY image assets. Place 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.
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).
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: Raw bytearray buffers.
Limitations:
- font is fixed to Terminus BDF
- Image encoding is buffer-based
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.
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.