Module: Thaum::Rendering

Defined in:
lib/thaum/rendering/buffer.rb,
lib/thaum/rendering/cell.rb,
lib/thaum/rendering/style.rb,
lib/thaum/rendering/canvas.rb,
lib/thaum/rendering/renderer.rb,
lib/thaum/rendering/box_drawing.rb

Overview

Segment-bitmap merging for Unicode box-drawing characters.

Each known glyph is encoded as four directional segment weights: [up, down, left, right]. Weights are 0 (none), 1 (light), 2 (heavy), 3 (double). When two glyphs are merged the result’s weights are the per-direction max of the inputs, looked up back to a canonical glyph.

Coverage:

  • Light family (U+2500-U+2503, U+250C-U+253C, half-stubs)

  • Heavy family (U+2501, U+2503, U+250F, U+2513, U+2517, U+251B, U+2523, U+252B, U+2533, U+253B, U+254B, U+2578-U+257B)

  • Mixed light/heavy (U+250D-U+250F minus 250C, U+2511-U+2513 minus 2510, etc. — full U+250C-U+254B region)

  • Double family (U+2550, U+2551, U+2554, U+2557, U+255A, U+255D, U+2560, U+2563, U+2566, U+2569, U+256C)

  • Mixed light/double (U+2552, U+2553, U+2555, U+2556, U+2558, U+2559, U+255B, U+255C, U+255E-U+256B)

  • Rounded corners (U+256D-U+2570) — share segments with non-rounded light corners; merges return the non-rounded canonical glyph.

Heavy + double in different directions has no Unicode glyph; merge falls through to “incoming wins.”

Defined Under Namespace

Modules: BoxDrawing Classes: Buffer, Canvas, Cell, Renderer, Style