Erbsland Core
  • Getting Started
  • Usage
  • Topics
    • Core
    • Memory
    • Compiled Resources
    • Security Topics
    • Cryptology
    • Text
    • Command Line Options System
    • Exceptions, Errors and Diagnostics
    • Filesystem Access and Manipulation
    • Random and Secrets
    • Regular Expressions
    • Event System
    • Logging
    • Streams
    • Network
    • Color Terminal
      • Color Terminal Demos
        • Bitmap Showcase
        • Log Viewer
        • Frame Color Animations
        • Retro Plasma
        • Frame Weaver
        • Display All Colors
        • Display All Attributes
        • Key Input Demo
        • Grid Layout
        • HTML Viewer
        • Terminal Chronicle
        • Text Gallery
      • Terminal
      • Backend
      • Input
      • Cursor Output
      • Buffer
      • Buffer Views
      • Frames, Borders, Tiles
      • BlockText Rendering
      • Paragraph Options
      • Bitmap
      • Font
      • Strings and Chars
      • Color
      • Geometry
  • Reference
  • The Story Behind Erbsland Core
  • Development Stages and Versioning
  • Requirements
  • Changelog
  • Guidelines
  • Index
Erbsland Core
  • Topics
  • Color Terminal
  • Color Terminal Demos
  • Text Gallery
  • View page source

Text Gallery

text-gallery demonstrates the text rendering side of the library in one interactive full-screen page set. It combines framed panels, wrapped paragraphs, mixed-width Unicode text, animated bitmap-font titles, and compact footer prompts.

Use This Demo When You Need…

  • A support example for alignment, wrapping, and mixed-width Unicode text inside framed panels.

  • A practical reference for bitmap-font text via Font::defaultAscii().

  • A single demo that shows several text-rendering techniques working together in one retained buffer.

Run the Demo

Start the demo from the build directory:

$ ./cmake-build-debug/demo-apps/cterm/text-gallery

Use the left and right arrow keys to switch pages. Press Q to quit.

Captured Output (80x25)

╭──────────────────────────────────────────────────────────────────────────────╮
│    Text Gallery | alignment, wrapping, wide characters, and bitmap fonts     │
│                                                                              │
│ ┌─────────────Top Left──────────────┐ ┏━━━━━━━━━━━━━━Center━━━━━━━━━━━━━━━┓  │
│ │Small panels are an easy way to    │ ┃                                   ┃  │
│ │compare alignment and wrapping side│ ┃                                   ┃  │
│ │by side.                           │ ┃The same paragraph can be centered ┃  │
│ │                                   │ ┃  without a custom layout engine.  ┃  │
│ │                                   │ ┃                                   ┃  │
│ │                                   │ ┃                                   ┃  │
│ └───────────────────────────────────┘ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛  │
│                                                                              │
│ ╔═══════════Bottom Right════════════╗ ╭────────────Top Center─────────────╮  │
│ ║                                   ║ │ Wrapping respects the box width,  │  │
│ ║                                   ║ │while alignment still decides where│  │
│ ║                                   ║ │         each line starts.         │  │
│ ║                                   ║ │                                   │  │
│ ║    Right and bottom alignment stay║ │                                   │  │
│ ║readable even inside narrow frames.║ │                                   │  │
│ ╚═══════════════════════════════════╝ ╰───────────────────────────────────╯  │
│                                                                              │
│                                                                              │
│ [←][→] switch pages [Q] quit page 1/3                                        │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

The capture may not show the terminal output correctly. Here a screenshot:

../../../_images/text-gallery3.jpg

Features Demonstrated

  • BlockText layout using BlockText together with multiple Alignment modes.

  • Unicode-aware wrapping and centering of mixed-width characters.

  • Bitmap-font rendering using Font::defaultAscii().

  • Animated title coloring with ColorSequence and BlockTextAnimation.

  • Colored footer prompts assembled from BlockString and Block elements.

Related Demos

  • Display All Attributes for line-oriented output with styled terminal text.

  • Grid Layout for centered content inside framed grid cells.

  • Bitmap Showcase for a companion demo centered on bitmap-based rendering instead of text.

Relevant Source Files

If you want to explore the implementation, start with demos/cterm/TextGallery/src/TextGalleryApp.cpp.

This file contains the complete layout logic for the panels, titles, and footer prompts shown in the demo.

Previous Next

© Copyright 2026, Tobias Erbsland - Erbsland DEV.

Built with Sphinx using a theme provided by Read the Docs.