Skip to content

Render Markdown task checkboxes with HarfBuzz font fallback - #169

Open
elcritch wants to merge 22 commits into
mainfrom
feat/unicode-text-rendering
Open

elcritch wants to merge 22 commits into
mainfrom
feat/unicode-text-rendering

Conversation

@elcritch

@elcritch elcritch commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Render Markdown task markers as ☐ ([ ]), ☑ ([x] / [X]), and ☒ ([-]), and enable FigDraw's HarfBuzz backend so missing glyphs use system-font fallback in the editor and terminal. Prepare Merenda 0.28.0.

  • Initialize fallback on layout workers as well as the main thread. Preserve empty-line positions and geometry, task-list nesting/formatting/links, and the Markdown AST.
  • Pin Harfbuzzy PR #2 at 48611dc (Harfbuzzy 0.3.0) and FigDraw PR #99 at 2371c40. The rasterizer uses the same statically linked HarfBuzz implementation as shaping.
  • Make nim install_kosmo build pinned HarfBuzz and FriBidi sources through -d:harfbuzzyStatic. Remove the local installer's shared-library build and bundling steps, and copy notices from the actual pinned sources. Set native/app compiler targets explicitly for macOS 13. Other builds retain their existing dynamic-library configuration.
  • Allow ad-hoc signed macOS debug apps to load bundled libraries, and check startup after signing, after staging, and through the installed command. Release builds continue to bundle macOS 13 compatible shared libraries.
  • Build Windows releases and examples with MSVC, package text DLLs/notices and the matching PDB, and retain function/source stack traces. A shared installer builds a private official Nim 2.2.10 compiler with checksum-verified atomic and embedded-binary-string fixes. Require released Sigils >= 0.32.0 and invoke MSVC directly for large linker response files.
  • Install Linux development libraries in CI, compare tooltip source text in tests, and suppress the existing thread-local font cache in ownership sanitizer runs. Publish hook-fixture PID readiness atomically, and allow enough time for the full GUI suites and optimized MSVC builds.

Validation: All 12 Merenda CI checks pass at aedb2c31: full suites, examples, and sanitizers and all release targets. All seven FigDraw checks pass at 2371c40, including both Windows renderers. All four Harfbuzzy checks pass at the pinned 0.3.0 commit 48611dc, including MSVC static/dynamic and MinGW dynamic builds.

All 112 focused font-layout, Markdown, and monospace-editor tests pass with both text libraries static and all three dynlib overrides deliberately invalid. The same 112 tests pass dynamically against HarfBuzz 14.6.0 and FriBidi 1.0.17. Harfbuzzy's 24 local tests pass in dynamic C/C++ and static C, including invalid dynlib names and shared-library linking. The hook readiness fix passes 50 standalone process/readiness iterations and both focused end-to-end hook tests.

The updated nim install_kosmo installs a signed 0.28.0 app; installed kosmo --version and --help pass. Its static binary defines both libraries' symbols, includes both notices, and passes a loader trace loading neither text dylib. A separate signed dynamic Kosmo.app also passes version/help and opens a visible native Metal window. Its runtime logs show symbol, Hebrew, and Arabic fallback fonts loading; loader tracing confirms both bundled dylibs load, and symbol inspection confirms neither implementation is embedded.

Astra reviewed the native bindings, static rasterizer, source-cache builds, MSVC runtime matching, and installer integration. It independently verified the FriBidi ABI and a sanitizer/linker-flag regression fix; no actionable findings remain.

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.

1 participant