Skip to content

t27f: Cyrillic idea factory -- UTF-8 ideas set in a 5x7 particle font #10788

Closed

Description

@gHashTag

Part of epic #10560. Follows the idea factory (#10771, PR #10784).

The idea factory reads its idea as ASCII and sets it in scene_raster's 3x5 font, which has no Cyrillic. The owner's reels are Russian. Today the Russian reels (lesson_reel, token_floor) draw their text with a TTF font through ffmpeg drawtext. That text is not made of particles and cannot move to the FPGA path. A 3x5 cell is also too small for Cyrillic letters such as Zh, Sh, Shch and Yu.

Boundary

  • New: specs/t27f/glyph57.t27.
    • UTF-8 decoding: cp_len, cp_at and cp_count. A malformed byte reads as one byte.
    • Case folding: Latin a..z, Cyrillic a..ya and yo fold to upper case.
    • The 5x7 font:
      • glyphs for ASCII 32..95 and for the 21 Cyrillic capitals with no Latin look-alike;
      • the 11 look-alikes (A, Ve, Ie, Ka, Em, En, O, Er, Es, Te, Ha) and Yo reuse Latin glyphs through a 32-entry map;
      • an unknown code point draws as ?.
    • Integer only: lookups and compares.
  • Changed: specs/t27f/idea_factory.t27.
    • It wraps by characters, not bytes.
    • It sets text in the 5x7 font, with a 6-pixel advance and a line pitch of 9.
    • It accepts UTF-8 ideas, written with \xNN escapes because L3 keeps sources ASCII-only.
  • Out of scope: lowercase glyphs, voice, and Verilog synthesis.

Scenarios

  • An idea in Russian, for example "particles build the frame" written in UTF-8, wraps by letters. A 7-letter Russian word, 14 bytes long, stays on one line.
  • Lower- and upper-case Russian light the same cells.
  • The English sample idea still gives 7 lines, 2 scenes and 216 frames.

Requirements

  • Decoding is pinned by tests: Zh (U+0416) is D0 96; yo (U+0451) folds to Yo (U+0401); a stray continuation byte counts as one character.
  • No two stored glyphs share a bitmap, and the space glyph is blank.
  • Every look-alike letter lights exactly the cells of its Latin twin.
  • Every target of every scene stays inside the frame. A scene lights at most MAXCELLS cells.

Criteria

  • t27c test-report passes on both specs with 0 vacuous tests (Railway lab).
  • Seals are saved and verified.
  • tools/dupe_scan.py is clean.
  • A Russian preview reel is rendered on the lab and shown to the owner.

🤖 Generated with Claude Code

Requirements

FR-001: The glyph57 spec MUST provide UTF-8 decoding with cp_len, cp_at, and cp_count where a malformed byte reads as one byte.
FR-002: The glyph57 spec MUST implement case folding for Latin a..z, Cyrillic a..ya, and yo to upper case.
FR-003: The glyph57 spec MUST define a 5x7 font with glyphs for ASCII 32..95 and the 21 Cyrillic capitals with no Latin look-alike.
FR-004: The glyph57 spec MUST map the 11 look-alike Cyrillic capitals (A, Ve, Ie, Ka, Em, En, O, Er, Es, Te, Ha) and Yo to their Latin glyphs through a 32-entry map.
FR-005: An unknown code point in the glyph57 spec MUST draw as ?.
FR-006: All lookups and comparisons in the glyph57 spec MUST use integer arithmetic only.
FR-007: The idea_factory spec MUST wrap text by Unicode characters, not bytes.
FR-008: The idea_factory spec MUST set text in the 5x7 font with a 6-pixel advance and a line pitch of 9.
FR-009: The idea_factory spec MUST accept UTF-8 ideas written with \xNN escapes.
FR-010: Decoding MUST be pinned by tests: Zh (U+0416) is D0 96; yo (U+0451) folds to Yo (U+0401); a stray continuation byte counts as one character.
FR-011: No two stored glyphs in the glyph57 spec MUST share a bitmap, and the space glyph MUST be blank.
FR-012: Every look-alike letter in the glyph57 spec MUST light exactly the cells of its Latin twin.
FR-013: Every target of every scene in the idea_factory spec MUST stay inside the frame, and a scene MUST light at most MAXCELLS cells.

Success Criteria

  • t27c test-report specs/t27f/glyph57.t27 passes with 0 vacuous tests and exit 0
  • t27c test-report specs/t27f/idea_factory.t27 passes with 0 vacuous tests and exit 0
  • Seals for specs/t27f/glyph57.t27 and specs/t27f/idea_factory.t27 are saved and verified with exit 0
  • tools/dupe_scan.py runs clean with exit 0

Activity

  1. added
    shape-refusedClosed by the issue-shape gate (specs/policy/issue_shape.t27); a passing edit reopens it
    on Oct 19, 2026
  2. github-actions commented on Oct 19, 2026

    @github-actions
    Contributor

    Closed by the issue-shape gate (specs/policy/issue_shape.t27, #7498): an issue must have the template's sections. Edit the body; an edit that passes reopens it.

    • missing: ## Requirements -- numbered obligations, FR-001: ... MUST ...
    • missing: ## Success Criteria -- an outcome a machine can settle: a number with a unit, a backticked file, exit 0, or a backticked command
  3. removed
    shape-refusedClosed by the issue-shape gate (specs/policy/issue_shape.t27); a passing edit reopens it
    on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions