Skip to content

✨ add text measurement helpers#30

Open
rauhryan wants to merge 1 commit intomainfrom
rr/text-measurement-helpers
Open

✨ add text measurement helpers#30
rauhryan wants to merge 1 commit intomainfrom
rr/text-measurement-helpers

Conversation

@rauhryan
Copy link
Copy Markdown
Collaborator

@rauhryan rauhryan commented May 9, 2026

Summary

  • add pure TypeScript text measurement helpers exported from mod.ts
  • document helper API and large-input behavior in specs/renderer-spec.md
  • normalize oversized text packing failures to descriptive RangeError messages
  • add coverage for wrap modes, Unicode widths, no-WASM/no-UTF8-staging measurement, and large UTF-8 projection rendering

Test

  • deno test

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 9, 2026

Open in StackBlitz

npm i https://pkg.pr.new/clayterm@30

commit: 6e3fcd6

@cowboyd
Copy link
Copy Markdown
Member

cowboyd commented May 9, 2026

I'm a bit worried that these measurement helpers present a completely different code path than the actual algorithm that clay uses to layout text. This could be a totally separate library.

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.

2 participants