Skip to content

Releases: erbsland-dev/erbsland-cpp-color-term

Erbsland Color Terminal 1.9

21 Apr 10:25
68e64fb

Choose a tag to compare

Erbsland Color Terminal Library 1.9.0 improves two important areas of the library: reusable terminal text handling and higher-level UI building blocks. The release adds shared string views, reusable status line and scrolling-view surfaces for the beta UI framework, a new ui-html-viewer demo, and broader documentation and test coverage around these additions.

Highlights

  • Added StringView and IndexRange for read-only terminal text access, cheap slicing, and clearer range-based string operations.
  • Added ui::surface::ScrollingBufferView, ui::surface::AbstractStatusLine, and ui::surface::StatusLine so applications can build scrollable document views, headers, and footers with much less custom code.
  • Added the ui-html-viewer demo to show how the HTML renderer and the beta UI framework fit together in a practical full-screen application.
  • Expanded ui::KeyBindings with convenience overloads for special keys, characters, combined text input, and grouped bindings.
  • Expanded the documentation with dedicated UI core, input, layout, and surface chapters, plus new demo pages and an implementation note for string sharing.
  • Added focused tests for StringView, IndexRange, paragraph and HTML rendering, key bindings, scrolling views, and status lines.

See the change log in the documentation for all details.

Erbsland Color Terminal 1.8

17 Apr 15:29
fdf8f07

Choose a tag to compare

Version 1.8.0 introduces two major new layers on top of the existing terminal primitives: a beta UI framework for
event-driven terminal applications and a rich-text/HTML renderer for structured terminal output. It also makes UTF-8
recovery deterministic, adds new demos, and greatly expands the reference and implementation documentation.

Highlights

  • Beta UI framework: erbsland::cterm::ui::Application, pages, surfaces, stack layout, panels, text boxes, key
    bindings, schedulers, and event threads for structured terminal applications.
  • Rich text and HTML rendering: erbsland::cterm::text::HtmlRenderer, Style, StyleRule, and TextNode for
    rendering HTML fragments or full documents to String or any CursorWriter.
  • Safer text decoding: String is now the explicit UTF-8 boundary, malformed UTF-8 recovers deterministically by
    default, and strict callers can opt into EncodingErrors::Throw.
  • New public support types: BufferResizeMode, ParagraphIndents, FastCharSet, and TerminalSession.
  • New demos and docs: html-viewer, ui-hello-world, expanded reference coverage, and new implementation notes for
    scheduling, layout, paragraph rendering, and rich-text planning.

Upgrade Notes

  • The new erbsland::cterm::ui module is currently beta and may still evolve in future releases.
  • Buffer::resize() now uses BufferResizeMode to make resize behavior explicit.
  • Text-based Char and CombinedChar construction now recovers deterministically instead of throwing by default. Use
    String with EncodingErrors::Throw when malformed UTF-8 must be rejected explicitly.

Documentation and Examples

  • Added reference chapters for rich text/HTML, the UI framework, and UI events.
  • Added implementation notes for action scheduling, event threads, stack layout, remapped buffers, paragraph layout,
    and text node rendering.
  • Added the html-viewer and ui-hello-world demos and reorganized shared demo infrastructure.

Erbsland Color Terminal 1.7.0

27 Mar 15:46
36b4f32

Choose a tag to compare

Version 1.7.0 brings a shared cursor-based output model to the library. With the new CursorWriter abstraction and the
new CursorBuffer, the same text-output code can now target live terminals and in-memory buffers, which makes
interactive tools, scrollback views, and rich terminal layouts much easier to structure.

This release also introduces reusable text styling with CharAttributes and CharStyle, expands buffer-to-buffer
drawing with BufferDrawOptions, adds new demos for text attributes, key input, and log viewing, and improves key
decoding plus UTF-8 recovery on interactive backends.

Highlights

  • Terminal now implements CursorWriter, aligning direct terminal output with buffer-based cursor output.
  • CursorBuffer adds VT100-style cursor writing, wrapping, configurable overflow handling, paragraph printing, and
    customizable fill characters.
  • CharAttributes and CharStyle add explicit ANSI attribute handling and reusable combined text styles.
  • WritableBuffer gains stronger buffer composition support through BufferDrawOptions, including source cropping and
    aligned placement.
  • Documentation and demos expanded significantly, including new pages for cursor output, text rendering, backend
    behavior, and three new demo applications.

New demos

  • display-all-attributes: explore ANSI text attributes and style combinations.
  • key-input-demo: inspect live key events, printable input, and resize-aware terminal behavior.
  • log-viewer: showcase scrollback-style rendering built with CursorBuffer and BufferView.

Reliability improvements

  • More robust key decoding for printable single-character input.
  • Better UTF-8 recovery after broken lead bytes and partial input chunks.
  • Improved POSIX input polling behavior for interactive console reads.

Upgrade notes

  • Projects with custom terminal-output helpers can now share more code by targeting CursorWriter.
  • Projects that build styled text programmatically should review the new CharAttributes and CharStyle APIs.
  • If you compose buffers manually, BufferDrawOptions and the updated WritableBuffer API provide a cleaner path for
    clipped and aligned buffer placement.

Erbsland Color Terminal 1.6.0

25 Mar 19:05
e7349a8

Choose a tag to compare

Erbsland Color Terminal 1.6.0 is centered on one practical goal: making text-heavy terminal interfaces much easier to
build and much easier to keep readable across different terminal widths.

The headline feature is a new paragraph layout system. You can now configure reusable ParagraphOptions and use them
both with Terminal::printParagraph() for direct terminal output and with Text / TextOptions when rendering into
buffers. That means the same settings can drive wrapped help screens, side panels, status views, and documentation-style
blocks with consistent alignment, indentation, wrap markers, tab stops, paragraph spacing, ellipsis handling, background
fill, and narrow-layout fallbacks.

This release also introduces RemappedBuffer, a new buffer type for applications that frequently insert, erase, move,
shift, or rotate full rows and columns. It is especially useful for scrollback views, editors, logs, and other large
grid-based interfaces where rewriting the whole buffer would be wasteful.

Highlights

  • Added ParagraphOptions, ParagraphBackgroundMode, ParagraphOnError, TabOverflowBehavior, and TextOptions for
    reusable paragraph-aware text rendering.
  • Added Terminal::printParagraph() for width-aware direct terminal output without needing a full-screen buffer first.
  • Added Terminal::isInteractive() so applications can choose between a rich interactive UI and a plain-text fallback
    when output is redirected.
  • Added RemappedBuffer and Orientation for efficient row- and column-based editing operations.
  • Expanded Text, String, and Char with helpers such as String::terminalLines(),
    String::containsControlCharacters(), and Char::isControl().
  • Added a new command-line-help demo that shows how to build adaptive terminal help output with the new paragraph
    APIs.

Documentation

  • Added a full paragraph-options reference with rendered examples for alignment, indentation, tab handling, wrap
    markers, background modes, and wrap limits.
  • Expanded the buffer, terminal, and text reference pages so the new text pipeline is documented from an application
    developer's point of view.
  • Added implementation notes for paragraph rendering, Unicode width handling, and the POSIX and Windows backends.

Erbsland Color Terminal Library 1.5

21 Mar 12:37
c837289

Choose a tag to compare

Version 1.5 is a refinement release focused on the low-level APIs that real applications build on: bitmap analysis, geometry utilities, hashing, color handling, and terminal lifecycle robustness. The biggest user-visible outcomes are easier neighborhood processing for bitmap and grid algorithms, direct support for unordered containers with core value types, more predictable inherited-color behavior when composing output incrementally, and better terminal restoration behavior when applications are interrupted.

Highlights

  • Added Bitmap::expanded(), Bitmap::pixelCardinal(), Position::ringEight(), Position::ringEightDeltas(), and Direction::fromDelta() to make neighborhood queries, contour logic, and grid navigation much easier to express with the public API.
  • Added Size::clamp(), Size::componentClamp(), Rectangle::clamp(), and Rectangle::center() for layout code that needs safe in-bounds positions without repeated manual clamping.
  • Added hash() methods and std::hash specializations for Foreground, Background, Color, Char, Direction, Position, Rectangle, and Key, so these types can now be used directly in std::unordered_map and std::unordered_set.
  • Added TerminalFlag and TerminalFlags, plus matching Terminal constructors, so applications can keep the default automatic terminal restoration or explicitly disable built-in signal handling when another framework already owns process shutdown.
  • Improved color parsing and inherited-color handling in String::append() and Terminal::write(), which makes mixed text, Char, and String output behave more consistently.

Added

  • Bitmap::expanded(Margins, bool) can enlarge a bitmap with a caller-selected fill value or crop it by using negative margins. This is useful for padding masks, growing work areas, or trimming results from image-like operations.
  • Bitmap::pixelCardinal() adds a compact four-neighbor bitmask helper that complements pixelQuad() and pixelRing().
  • Position::ringEight() and Position::ringEightDeltas() provide a clockwise eight-neighbor traversal order that can be reused across bitmap and board-style algorithms.
  • Direction::fromDelta() converts any delta into one of the canonical directions by sign, which removes boilerplate from cursor, movement, and pathfinding code.
  • Size::clamp() and Rectangle::clamp() now provide a direct way to force positions back into valid bounds.
  • Core value types now expose stable hashing APIs and std::hash support for direct use with unordered standard containers.
  • TerminalFlag and TerminalFlags are now public, and the built-in terminal backend can be configured at construction time with flags such as NoSignalHandling.

Improved

  • String::append() now resolves inherited foreground and background components against the active color within the same append call, even for appended Char and String objects. Mixed argument lists therefore behave the same way as appended plain text.
  • Terminal::write(const Char &) and Terminal::write(const String &) now resolve inherited colors against the terminal's tracked current color before output. Incremental writes now keep foreground and background inheritance aligned with what is already active on the terminal.
  • Built-in POSIX and Windows backends now restore terminal state more robustly when the process is interrupted, which reduces the chance of leaving the shell in a broken state after Ctrl+C or related termination events.
  • ColorPart::fromString() and Color::fromString() now accept more human-friendly names such as bright blue, bright_blue, and bright-blue.
  • TerminalFlag values can now be combined directly with |, which makes terminal setup code shorter and clearer.

Behavior To Note

  • If your code relied on the previous inherited-color behavior in String::append() or Terminal::write(), the rendered colors may now differ. The new behavior is more consistent: inherited components resolve against the active color instead of being left ambiguous.
  • Color configuration strings are now more permissive, so existing configurations continue to work while handwritten themes become easier to read.
  • If your application already installs its own signal or console-control handling, use TerminalFlag::NoSignalHandling when constructing Terminal to avoid competing shutdown logic.

Quality

  • This release adds broad unit test coverage for bitmap helpers, geometry helpers, color parsing, terminal convenience APIs, update settings, hashing, and several existing convenience classes that previously had limited dedicated coverage, while also reworking internal signal dispatching on POSIX and Windows for correctness and robustness.

Improve signal handling robustness and platform correctness

17 Mar 10:24
dfe8ea6

Choose a tag to compare

This is a bugfix and maintenance release that addresses issues in the previously introduced signal handling implementation.

Changes

  • POSIX: Switched to a signal-safe self-pipe mechanism and improved shutdown handling.
  • Windows: Replaced std::signal with the native console control handler and refined lifecycle management.

These changes improve overall robustness, correctness, and alignment with platform-specific best practices.

Erbsland Color Terminal Library 1.4.0

15 Mar 22:14
a8ece19

Choose a tag to compare

Release 1.4.0 reorganizes the rendering API around reusable buffer abstractions, introduces scrollable buffer views and backend customization, and expands the text and bitmap helper APIs.

The most important changes for users are the new generic ReadableBuffer / WritableBuffer rendering pipeline, extended Terminal control features, and updated screen rendering defaults including safe margins and automatic alternate-screen updates.

Highlights

  • Introduced ReadableBuffer and WritableBuffer as public base interfaces. Applications can now render, compare, copy, and modify terminal content without depending on a concrete Buffer implementation.
  • Added BufferView, BufferConstRefView, and CropEdges for view-based rendering of larger logical canvases, including optional crop markers for scrollable or clipped content.
  • Extended Terminal with backend customization (Backend), output modes (OutputMode), cursor movement helpers, safe-margin handling, and alternate-screen control.
  • Expanded UpdateSettings with configurable minimum-size backgrounds, centered messages, crop markers, and control over automatic alternate-screen switching.
  • Improved text layout support with ParagraphSpacing, and expanded Bitmap utilities with higher-level analysis and editing helpers such as outlining, flood fill, and bounding boxes.

Added

Buffer and Rendering

  • Added ReadableBuffer::countDifferencesTo() and ReadableBuffer::toMask() for comparing rendered frames and generating bitmap masks from buffer content.
  • Added WritableBuffer::setFrom() and WritableBuffer::setAndResizeFrom() for copying buffer content across writable targets.
  • Added Buffer::clone() to duplicate buffers for frame comparisons or history.
  • Added a default Buffer() constructor and additional helpers including resize(Size, bool, Char), fromLinesInString(), and fromLines().

Terminal and Backend

  • Added Backend as a public extension point for custom terminal implementations.
  • Made Input a public interface so custom backends can provide their own input handling.
  • Added terminal output modes via Terminal::OutputMode (FullControl and Text).
  • Added new terminal control helpers including:
    • setBackend()
    • setAlternateScreen()
    • moveTo(), moveHome()
    • moveCursor(), moveRight(), moveUp(), moveDown()
    • setAutoWrap()
    • setCursorVisible()

Bitmap Utilities

Added numerous bitmap analysis and manipulation helpers:

  • rect()
  • pixelRing()
  • boundingRect()
  • pixelCount()
  • invert() / inverted()
  • outlined()
  • fillRect()
  • floodFill()
  • fromFunction()
  • toPattern()

Text and String Utilities

  • Added Text::setParagraphSpacing() and paragraph-aware wrapping via String::wrapIntoLines(..., ParagraphSpacing).
  • Added string helpers:
    • count()
    • indexOf()
    • substr()
    • splitLines()
    • String::fromLines()

Geometry and Character Helpers

  • Expanded Rectangle utilities including overlap, containment, and intersection helpers.
  • Added Rectangle::frameDirection() and Rectangle::bounds().
  • Added new Char convenience checks such as isEmpty() and isOneOf().

Improvements

  • Terminal::updateScreen() and Terminal::write() now accept any ReadableBuffer implementation instead of requiring a concrete Buffer.
  • Terminal::size() now reports a drawable size with a one-row and one-column compatibility margin by default, making full-screen layouts safer on real terminals.
  • Terminal::updateScreen() can automatically switch to the alternate screen buffer through UpdateSettings when supported by the backend.
  • Minimum-size handling now supports configurable background fill and centered messages.
  • Paragraph wrapping now supports compact and double-spaced layouts through ParagraphSpacing.

Deprecations

The following APIs are deprecated:

  • Terminal::colorEnabled() / setColorEnabled() → replaced by outputMode()
  • Terminal::lineBreak() → replaced by writeLineBreak()
  • Old Buffer::drawText(std::string_view, Alignment, Rectangle, ...) overload
  • Previous UpdateSettings marker naming and constructor API

Internal Changes

  • Expanded API documentation, demos, and unit tests.
  • Refactored the rendering pipeline into clearer internal components including painters, backend handling, string wrapping, and line buffering to improve maintainability and testability.

Add Rendering, Unicode, and Terminal Update Improvements

10 Mar 15:34
cc76339

Choose a tag to compare

Release 1.2.0 brings richer rendering primitives, better Unicode handling, smarter terminal updates, and broader examples and test coverage.

Highlights

  • Added BitmapDrawOptions and new Buffer::drawBitmap() overloads for configurable bitmap rendering with scale modes, animated color sequences, stripe-based color modes, custom block characters, and optional Char16Style integration.
  • Added Tile9Style plus matching Buffer support for repeating 3×3 and extended 16-tile patterns when filling rectangles, drawing frames, and drawing filled frames.
  • Added Rectangle::gridCells() to split layouts into evenly spaced grid cells.
  • Expanded Char and String with UTF-32 support, multi-codepoint handling, improved combining-character support, and more flexible color overlay and base-color operations.
  • Improved color composition with explicit Inherited handling across ColorPart, Color, text rendering, bitmap rendering, and buffer-based drawing.
  • Extended Terminal screen updates with clearer refresh strategies, optional line buffering, optional back-buffer diff updates, improved crop-mark handling, and better minimum-size rendering behavior.

Added

  • New display-all-colors demo for exploring the color model and layout helpers.
  • New bitmap-showcase demo for bitmap rendering options, styles, and animated color modes.
  • New update-screen-modes demo for comparing clear, overwrite, and back-buffer update behavior.
  • New unit tests for Tile9Style, terminal update behavior, bitmap rendering paths, and Rectangle::gridCells().
  • Added display-all-colors, bitmap-showcase, and update-screen-modes demo applications.
  • Added BitmapDrawOptions and configurable bitmap rendering in Buffer.
  • Added Tile9Style and tile-based fill/frame rendering support.
  • Added Rectangle::gridCells().
  • Added UTF-32 and multi-codepoint support to Char and String.

Improved

  • Updated frame-weaver, text-gallery, retro-plasma, and terminal-chronicle to use the newer rendering and color APIs.
  • Refined terminal output APIs and documentation around refresh modes, direct writes, buffer rendering, crop marks, and smart overwrites.
  • Improved bitmap, text, geometry, color, and output reference documentation.
  • Improved color overlay behavior and inherited color handling throughout the library.
  • Improved Terminal::updateScreen() with refresh-mode, back-buffer, crop-mark, and minimum-size handling updates.

Implementation

  • Improved memory efficiency.
  • Expanded unit tests and API/reference documentation across rendering, geometry, text, and terminal output.

Erbsland Color Terminal – Initial Release

08 Mar 22:47
ef9bf09

Choose a tag to compare

The Erbsland Color Terminal library is a small and focused C++20 static library for building rich terminal applications.

It provides reliable building blocks for colorful terminal output, Unicode-aware text handling, key-based input, and geometry helpers that simplify the development of terminal user interfaces, tools, and games.

Highlights

  • Modern C++20 design
  • Reliable ANSI color output
  • Unicode-aware text handling
  • Cross-platform support (Linux, macOS, Windows)
  • Practical helpers for building terminal UIs

Features

Colorful Terminal Output

  • ANSI foreground and background colors
  • Typed color parts and color sequences
  • Convenient print helpers
  • Safe handling of colored terminal strings

Unicode-Aware Text Handling

  • Correct handling of zero-width characters
  • Proper support for full-width characters
  • Unicode-aware terminal strings
  • Per-cell character buffers

Terminal Interaction

  • Terminal output and screen handling
  • Platform-specific key input
  • Terminal size detection with resize callbacks

Geometry and Layout

  • Positions, sizes, rectangles
  • Anchors, alignments, margins
  • Bitmap helpers for terminal layouts

Drawing Utilities

  • Frame and rectangle drawing
  • Automatic line junction selection for borders
  • Text wrapping and alignment helpers

Bitmap Fonts

  • Built-in bitmap font support
  • Custom font support for banners and headings
  • Rendering of large characters directly in the terminal

Documentation

Full documentation is available in the project documentation, including:

  • Installation and integration guides
  • A step-by-step tutorial
  • API reference
  • Demo applications
  • Requirements and build setup

Requirements

  • C++20 compatible compiler
  • CMake
  • Python (for documentation tooling)

License

Licensed under the Apache License 2.0.