Title: Fast composed-font emoji rendering via lv_imgfont_set_range by bitcoin3us · Pull Request #148 · MicroPythonOS/MicroPythonOS · GitHub
Open Graph Title: Fast composed-font emoji rendering via lv_imgfont_set_range by bitcoin3us · Pull Request #148 · MicroPythonOS/MicroPythonOS
X Title: Fast composed-font emoji rendering via lv_imgfont_set_range by bitcoin3us · Pull Request #148 · MicroPythonOS/MicroPythonOS
Description: Summary Cuts the per-glyph cost of FontManager.getFont(emoji=True) labels from a C→Python round-trip per glyph to two int compares in C, for any codepoint that isn't in the emoji map. User-visible result: noticeably smoother scrolling of any label that uses an emoji-fallback font (Lightning Piggy transactions row, Files list, etc.) — even though most rows have no emoji in them. How Three pieces: internal_filesystem/lib/mpos/ui/font_manager.py — _create_emoji_font(size) now calls lv.imgfont_set_range(font, cp_min, cp_max, 0xE000, 0xF8FF) after lv.imgfont_create. cp_min/cp_max are computed dynamically from the loaded _emoji_maps keys, so the filter self-maintains as the emoji set grows — no hardcoded magic number. Guarded by try/except AttributeError so older lvgl_micropython pins still work (just without the speedup). scripts/build_mpos.sh — applies lvgl_micropython/imgfont_set_range.patch against lib/lvgl during the build. Gated by a -f existence check, so older lvgl_micropython pins (no patch file present) still build cleanly. lvgl_micropython submodule — bumped 916ec6b → e00d9d9. Picks up the new imgfont_set_range.patch plus a small drive-by brew-config parser fix in builder/macOS.py that was breaking macOS builds entirely. Dependency This PR depends on MicroPythonOS/lvgl_micropython#3. The submodule pointer here references e00d9d9, which currently lives only on the bitcoin3us/lvgl_micropython fork. Once #3 merges into MicroPythonOS/lvgl_micropython, this PR's submodule pointer will resolve from upstream and this can land. .gitmodules is intentionally untouched (still points at the canonical URL). Test plan macOS desktop build (build_mpos.sh macOS) — clean, lv.imgfont_set_range exposed in the LVGL binding ESP32-S3 firmware build (build_mpos.sh esp32s3) — clean build, patch applies, all expected freezing happens Flash + boot on Waveshare ESP32-S3-Touch-LCD-2 — boots cleanly, lv.imgfont_set_range callable, FontManager wiring works FontManager bounds calculation on device — with the 400-emoji set loaded, bounds resolve to (0x203C, 0x1F9E2) (exact min/max across the loaded codepoints, as designed) Backward-compat fallback — try/except AttributeError path verified mentally (covered by gating in build_mpos.sh) User test — scrolling the Lightning Piggy transactions list feels noticeably smoother than the pre-patch firmware
Open Graph Description: Summary Cuts the per-glyph cost of FontManager.getFont(emoji=True) labels from a C→Python round-trip per glyph to two int compares in C, for any codepoint that isn't in the emoji map. User-visi...
X Description: Summary Cuts the per-glyph cost of FontManager.getFont(emoji=True) labels from a C→Python round-trip per glyph to two int compares in C, for any codepoint that isn't in the emoji map. User-...
Opengraph URL: https://github.com/MicroPythonOS/MicroPythonOS/pull/148
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:ec36ff4f-15cd-f220-0884-70f0b1076995 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | BD1C:F3931:104B:14A4:6A523C98 |
| html-safe-nonce | 8fafee1d0bc733b4f2c5ab7392fa3a07485afeb5c46ee20e4031bedd0be6f0e7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRDFDOkYzOTMxOjEwNEI6MTRBNDo2QTUyM0M5OCIsInZpc2l0b3JfaWQiOiI4MzI3ODA3MjU5MzMwNjI0NjY0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 03df41f5fc253fe9e4c36b3b749e404150696e96545327780c4ed8864f1965d2 |
| hovercard-subject-tag | pull_request:3774867370 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/MicroPythonOS/MicroPythonOS/pull/148/files |
| twitter:image | https://avatars.githubusercontent.com/u/115934595?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/115934595?s=400&v=4 |
| og:image:alt | Summary Cuts the per-glyph cost of FontManager.getFont(emoji=True) labels from a C→Python round-trip per glyph to two int compares in C, for any codepoint that isn't in the emoji map. User-visi... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/MicroPythonOS/MicroPythonOS git https://github.com/MicroPythonOS/MicroPythonOS.git |
| octolytics-dimension-user_id | 213598128 |
| octolytics-dimension-user_login | MicroPythonOS |
| octolytics-dimension-repository_id | 975472483 |
| octolytics-dimension-repository_nwo | MicroPythonOS/MicroPythonOS |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 975472483 |
| octolytics-dimension-repository_network_root_nwo | MicroPythonOS/MicroPythonOS |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width