loom & weft
Made for Swift.

Published release 0.2.1. Unreleased PR #2 reference.

LOOM 0.2.1 / RENDERING AND LAYOUT

Cell

A normal blank cell is a space of width 1 with default style and no link. Width 2 starts a wide grapheme; width 0 is its trailing continuation. Mutating cells directly bypasses Buffer.put validation and wide-cell cleanup.

Standard inherited Swift protocol operations such as synthesized equality and OptionSet set operations are not repeated. The public declarations below are extracted from the exact source revision listed in the coverage manifest.

Example

let cell = Cell(symbol: "A", style: Style(bold: true))
_ = cell.width
Members on this page

Feature guides and release status

Cell

Structure
struct Cell

Conforms to: Swift.Equatable, Swift.Sendable, Swift.SendableMetatype.

One terminal cell, including continuation cells for wide graphemes.

Source · Cell.swift:4

symbol

Instance Property
var symbol: String

The visible grapheme or symbol string.

Source · Cell.swift:5

width

Instance Property
var width: Int

0 marks the trailing cell of a two-column grapheme.

Source · Cell.swift:8

style

Instance Property
var style: Style

Visual attributes used when painting this value.

Source · Cell.swift:9