Releases: erbsland-dev/erbsland-cpp-color-term
Erbsland Color Terminal 1.9
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
StringViewandIndexRangefor read-only terminal text access, cheap slicing, and clearer range-based string operations. - Added
ui::surface::ScrollingBufferView,ui::surface::AbstractStatusLine, andui::surface::StatusLineso applications can build scrollable document views, headers, and footers with much less custom code. - Added the
ui-html-viewerdemo to show how the HTML renderer and the beta UI framework fit together in a practical full-screen application. - Expanded
ui::KeyBindingswith 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
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, andTextNodefor
rendering HTML fragments or full documents toStringor anyCursorWriter. - Safer text decoding:
Stringis now the explicit UTF-8 boundary, malformed UTF-8 recovers deterministically by
default, and strict callers can opt intoEncodingErrors::Throw. - New public support types:
BufferResizeMode,ParagraphIndents,FastCharSet, andTerminalSession. - 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::uimodule is currently beta and may still evolve in future releases. Buffer::resize()now usesBufferResizeModeto make resize behavior explicit.- Text-based
CharandCombinedCharconstruction now recovers deterministically instead of throwing by default. Use
StringwithEncodingErrors::Throwwhen 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-viewerandui-hello-worlddemos and reorganized shared demo infrastructure.
Erbsland Color Terminal 1.7.0
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
Terminalnow implementsCursorWriter, aligning direct terminal output with buffer-based cursor output.CursorBufferadds VT100-style cursor writing, wrapping, configurable overflow handling, paragraph printing, and
customizable fill characters.CharAttributesandCharStyleadd explicit ANSI attribute handling and reusable combined text styles.WritableBuffergains stronger buffer composition support throughBufferDrawOptions, 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 withCursorBufferandBufferView.
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
CharAttributesandCharStyleAPIs. - If you compose buffers manually,
BufferDrawOptionsand the updatedWritableBufferAPI provide a cleaner path for
clipped and aligned buffer placement.
Erbsland Color Terminal 1.6.0
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, andTextOptionsfor
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
RemappedBufferandOrientationfor efficient row- and column-based editing operations. - Expanded
Text,String, andCharwith helpers such asString::terminalLines(),
String::containsControlCharacters(), andChar::isControl(). - Added a new
command-line-helpdemo 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
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(), andDirection::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(), andRectangle::center()for layout code that needs safe in-bounds positions without repeated manual clamping. - Added
hash()methods andstd::hashspecializations forForeground,Background,Color,Char,Direction,Position,Rectangle, andKey, so these types can now be used directly instd::unordered_mapandstd::unordered_set. - Added
TerminalFlagandTerminalFlags, plus matchingTerminalconstructors, 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()andTerminal::write(), which makes mixed text,Char, andStringoutput 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 complementspixelQuad()andpixelRing().Position::ringEight()andPosition::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()andRectangle::clamp()now provide a direct way to force positions back into valid bounds.- Core value types now expose stable hashing APIs and
std::hashsupport for direct use with unordered standard containers. TerminalFlagandTerminalFlagsare now public, and the built-in terminal backend can be configured at construction time with flags such asNoSignalHandling.
Improved
String::append()now resolves inherited foreground and background components against the active color within the same append call, even for appendedCharandStringobjects. Mixed argument lists therefore behave the same way as appended plain text.Terminal::write(const Char &)andTerminal::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+Cor related termination events. ColorPart::fromString()andColor::fromString()now accept more human-friendly names such asbright blue,bright_blue, andbright-blue.TerminalFlagvalues 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()orTerminal::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::NoSignalHandlingwhen constructingTerminalto 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
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::signalwith 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
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
ReadableBufferandWritableBufferas public base interfaces. Applications can now render, compare, copy, and modify terminal content without depending on a concreteBufferimplementation. - Added
BufferView,BufferConstRefView, andCropEdgesfor view-based rendering of larger logical canvases, including optional crop markers for scrollable or clipped content. - Extended
Terminalwith backend customization (Backend), output modes (OutputMode), cursor movement helpers, safe-margin handling, and alternate-screen control. - Expanded
UpdateSettingswith configurable minimum-size backgrounds, centered messages, crop markers, and control over automatic alternate-screen switching. - Improved text layout support with
ParagraphSpacing, and expandedBitmaputilities with higher-level analysis and editing helpers such as outlining, flood fill, and bounding boxes.
Added
Buffer and Rendering
- Added
ReadableBuffer::countDifferencesTo()andReadableBuffer::toMask()for comparing rendered frames and generating bitmap masks from buffer content. - Added
WritableBuffer::setFrom()andWritableBuffer::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 includingresize(Size, bool, Char),fromLinesInString(), andfromLines().
Terminal and Backend
- Added
Backendas a public extension point for custom terminal implementations. - Made
Inputa public interface so custom backends can provide their own input handling. - Added terminal output modes via
Terminal::OutputMode(FullControlandText). - 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 viaString::wrapIntoLines(..., ParagraphSpacing). - Added string helpers:
count()indexOf()substr()splitLines()String::fromLines()
Geometry and Character Helpers
- Expanded
Rectangleutilities including overlap, containment, and intersection helpers. - Added
Rectangle::frameDirection()andRectangle::bounds(). - Added new
Charconvenience checks such asisEmpty()andisOneOf().
Improvements
Terminal::updateScreen()andTerminal::write()now accept anyReadableBufferimplementation instead of requiring a concreteBuffer.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 throughUpdateSettingswhen 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 byoutputMode()Terminal::lineBreak()→ replaced bywriteLineBreak()- Old
Buffer::drawText(std::string_view, Alignment, Rectangle, ...)overload - Previous
UpdateSettingsmarker 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
Release 1.2.0 brings richer rendering primitives, better Unicode handling, smarter terminal updates, and broader examples and test coverage.
Highlights
- Added
BitmapDrawOptionsand newBuffer::drawBitmap()overloads for configurable bitmap rendering with scale modes, animated color sequences, stripe-based color modes, custom block characters, and optionalChar16Styleintegration. - Added
Tile9Styleplus matchingBuffersupport 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
CharandStringwith UTF-32 support, multi-codepoint handling, improved combining-character support, and more flexible color overlay and base-color operations. - Improved color composition with explicit
Inheritedhandling acrossColorPart,Color, text rendering, bitmap rendering, and buffer-based drawing. - Extended
Terminalscreen 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-colorsdemo for exploring the color model and layout helpers. - New
bitmap-showcasedemo for bitmap rendering options, styles, and animated color modes. - New
update-screen-modesdemo for comparing clear, overwrite, and back-buffer update behavior. - New unit tests for
Tile9Style, terminal update behavior, bitmap rendering paths, andRectangle::gridCells(). - Added
display-all-colors,bitmap-showcase, andupdate-screen-modesdemo applications. - Added
BitmapDrawOptionsand configurable bitmap rendering inBuffer. - Added
Tile9Styleand tile-based fill/frame rendering support. - Added
Rectangle::gridCells(). - Added UTF-32 and multi-codepoint support to
CharandString.
Improved
- Updated
frame-weaver,text-gallery,retro-plasma, andterminal-chronicleto 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
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.