Skip to content

fix(simulation): render screenshot symbol glyphs#37691

Merged
kitlangton merged 1 commit into
v2from
glyph-fallback
Jul 19, 2026
Merged

fix(simulation): render screenshot symbol glyphs#37691
kitlangton merged 1 commit into
v2from
glyph-fallback

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

What

Render OpenCode symbols and braille spinner frames in V2 simulation PNG screenshots instead of missing-glyph boxes.

Before / After

Before: ui.screenshot() registered only the Latin subset of Commit Mono. Symbols such as , , , and spinner frame therefore resolved to the canvas renderer's tofu glyph.

After: the simulation renderer registers packaged Noto Symbols, Symbols 2, braille, and Math subsets and uses them after Commit Mono in its font stack. Supported UI symbols now render as their actual glyphs.

How

  • packages/simulation/src/frontend/png.ts registers Fontsource WOFF2 fallback assets under simulation-owned font families.
  • packages/simulation/package.json adds pinned Fontsource dependencies so assets resolve in installed packages and CI.
  • packages/simulation/test/png.test.ts compares each representative symbol's decoded cell pixels against an intentionally unassigned Unicode code point, detecting actual missing-glyph substitution rather than merely checking for non-empty PNG output.

Scope

This changes only V2 simulation PNG font fallback. It does not couple simulation to OpenCode Drive and does not change exploration grouping behavior.

Testing

  • Red: bun test test/png.test.ts from packages/simulation failed because had the same raster as U+10FFFF.
  • Green: bun test test/png.test.ts from packages/simulation (4 passed).
  • bun test test from packages/simulation (28 passed).
  • bun typecheck from packages/simulation.
  • Push hook: bun turbo typecheck --concurrency=3 (32 tasks passed).
  • bun run lint packages/simulation/src packages/simulation/test (0 errors; 11 pre-existing warnings in untouched code).
  • bunx prettier --check packages/simulation/src/frontend/png.ts packages/simulation/test/png.test.ts packages/simulation/package.json.
  • git diff --check.

@kitlangton
kitlangton merged commit 584fdef into v2 Jul 19, 2026
10 checks passed
@kitlangton
kitlangton deleted the glyph-fallback branch July 19, 2026 01:36
github-actions Bot pushed a commit to ReStranger/opencode that referenced this pull request Jul 19, 2026
* upstream/v2:
  mini: fix shell tool output display (anomalyco#37711)
  fix(core): detach disposed MCP registrations from root scope (anomalyco#37660)
  fix(core): preserve the first terminal failure (anomalyco#37705)
  fix(core): continue after malformed tool input (anomalyco#37701)
  fix(core): safely recover malformed tool input (anomalyco#37698)
  fix(simulation): render screenshot symbol glyphs (anomalyco#37691)
  fix(core): authorize relative external paths (anomalyco#37689)
  fix(tui): auto-approve permissions in auto mode
  feat(core): allow MCP Code Mode opt-out (anomalyco#37681)
  fix(codemode): stop leaking undefined into tool arguments (anomalyco#37652)
  fix(tui): style interrupted compaction neutrally (anomalyco#37655)
  fix(cli): harden managed service election (anomalyco#37645)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant