Skip to content

Text-sizing comparison ​

The catalog separates protocol producers, text libraries, and terminal receivers. Comparing them under a single "supports OSC 66" flag hides the most important architectural boundaries.

Last reviewed: September 14, 2026

At a glance ​

SubjectActual capability at inspected revisionMost useful precedentPrincipal limitation
KittyFull receiver with multicells and fractional renderingOwnership, editing, reflow, selection, independent oracleImplementation limits and tolerant parsing differ from protocol constraints
GhosttyParser onlyExplicit evidence of receiver dependency boundaryNeither execution nor C multicell metadata
footWidth-only receiverWhole-payload horizontal storage and reflowNo enlarged/multirow text
libvaxisWidth and sizing emitterStructured scale fields and independent flagsFootprint/equality/clipping risks
OpenTUIWidth emitter; scale detection onlyShared wrap/measure engine and retained synchronizationNo variable-height text layout
BlessedConvenience writer and probeSeparate width/scale observationsUnsafe payload gaps and combined emission gating
wcwidthSemantic parsing, width and extractionPrintable OSC classificationExplicit-width clipping and wrapping gaps
presentermInteger-sized document flowEffective size before layout; row heightsIncomplete grapheme/payload/clipping guarantees
osc66Font-derived explicit widthAllocation from shaping advancesFont mismatch, RTL assumptions, no safe fallback
mdfriedNative/image/plain headingsExplicit alternate presentation pathsRaw escape injection and separate wrap/emission arithmetic

Per-dimension comparison ​

Protocol and API ​

Foot proves that width-only support is a useful implemented subset. Ghostty proves that recognizing the OSC command is not executing it. OpenTUI adds a third boundary: observing terminal scale support does not mean the toolkit can lay out scaled text. Public capability reporting should name the layer and operation, not use a broad feature label.

Measurement and geometry ​

Presenterm has the clearest sequential-layout precedent: effective size influences widths and line heights before painting. OpenTUI shares wrapping logic between speculative measurement and committed layout, while keeping their state separate. Sparkles needs both properties plus source-to-geometry data.

wcwidth measures horizontal allocation but not occupied height. mdfried independently calculates wrap budgets and emitted chunk widths, which can disagree for CJK. osc66 derives advances from one font, but the receiver may render another font. None justifies deriving layout from ink scale alone.

Capability and fallback ​

Presenterm demonstrates the architectural benefit of normalizing unsupported sizes before layout, but the capability result must be reliable: its combined-displacement probe would misclassify foot's two ordinary spaces as integer scaling support. This is a source-derived false-positive case, not an executed probe; the study also documents a title-override fallback exception. Blessed exposes separate probe results but gates output on their combined truthiness. OpenTUI's merged fixes show that startup CPRs and loose coordinate checks produce false positives. Force-off must suppress probing itself.

No surveyed probe should be copied without auditing input ownership, deadlines, screen edges, unrelated input preservation, partial results, and cleanup.

Layout and clipping ​

Kitty provides terminal placement, not a pane-local clipping API. Presenterm rejects bottom-overflowing runs; mdfried avoids partially visible headings; OpenTUI already rejects partly clipped ordinary wide graphemes. These support a conservative whole-object clipping policy for the first Sparkles terminal implementation, not arbitrary partial rendering.

wcwidth's explicit-width clip illustrates a different problem: knowing a block's total width does not identify which substring occupies a selected column.

Retained state and interaction ​

Kitty is the reference for two-dimensional ownership and editing. Foot demonstrates a side allocation for uncommon whole-payload text while keeping ordinary cells compact. OpenTUI distinguishes composition writes from retained-mirror synchronization. Libvaxis shows why scale must be stored and compared, and why rebuilding skipped coverage only during redraw is insufficient.

mdfried places raw commands inside one nominal cell and skips the rest. That can demonstrate headings but is not an adequate correspondence invariant for a reusable widget compositor, source selection, or terminal embedding.

Safety and evidence ​

Several emitters lack full safe-UTF-8 checks. Scalar-sized chunks do not bound byte length; zero-width text defeats width-based limits. Foot's empty-payload fix shows the importance of empty-input cases even in receivers.

The validation ledger separates byte-level examples, executed library reproductions, source-inspected tests, and proposed terminal oracles. Agreement between a writer and a model built from the same helper is not independent proof.

There is no complete cross-project consensus implementation. The evidence supports these common requirements rather than claiming every subject already meets them:

  1. Separate allocation, ink scale, source identity, and cursor position.
  2. Treat text-bearing OSC records differently from nonprinting controls.
  3. Keep explicit-width payloads atomic unless an internal layout is actually known.
  4. Resolve fallback before measurement and wrapping.
  5. Keep terminal probing outside pure text writers and inside input ownership.
  6. Represent retained ownership across unchanged frames and footprint transitions.
  7. Validate complete payloads before emission and preserve grapheme boundaries.

Architectural trade-offs ​

ChoiceBenefitCost or condition
Width-only milestoneFoot supplies an independent receiver; fixes allocation disagreementsDoes not fulfill enlarged-heading goals
Integer scales firstExact base-cell geometry, straightforward line heightFractional ink and packing still need explicit policy
Shared laid-out runs/clustersPaint, selection, wrap and hit testing agreeFrame storage and cache invalidation become explicit responsibilities
Multicell side arenaOrdinary cells need not inline large payloadsOwnership, equality, copying and lifetime rules must be tested
Whole-object clippingPrevents unintended terminal wrapping/scrollingPartially visible text is omitted rather than pixel-scissored
Erase-before-paint damage closureCorrect replacement of intersecting objectsMore work and output than cell-local diffing
Upstream Ghostty executionOne VT owns editing, scrollback and selectionSubstantial dependency work with desktop/Android packaging
Separate shaping workstreamKeeps base protocol support lightweightAdvanced GPU typography remains a later deliverable

Sparkles delta ​

The baseline gives exact source locations; this table summarizes the distance to the proposed capability, not delivered status.

CapabilityCurrent boundaryProposed change
Printable OSC payloadsAll escapes treated as zero-width/strippable in relevant pathsShared semantic text-unit parsing and readable extraction
Safe writerNo dedicated OSC 66 writerValidated metadata and bounded payload emission
Sized widget layoutfontScale preserved but fixed-size measurementStyle-aware shared text geometry and inheritance
Text interactionUnit-row/codepoint placement assumptionsReuse cluster/source geometry and effective clips
Retained terminal pictureHorizontal width 0/1/2 cellsRectangular owners, continuations and damage closure
GPU sizingFixed whole-run drawing despite scalable primitiveResolved advances and ink scale; bounded font caches if needed
Markdown headingsExisting rich semantics, no size policyTheme/options-driven sizes across GUI/TUI/ANSI
Terminal receptionGhostty parser-only dependencyVT execution and C metadata before adapter work
ANSI fencesFixed cell-to-line projectionPreserve spatial text objects and dimensions

Sources and next steps ​

Read the proposal for staged delivery and independent acceptance gates. The concepts page defines shared terms. Individual studies preserve revision provenance, quoted evidence, limitations, and upstream issue states.