Skip to content

Comments

Adding Scrollable TextBlock Control with Font Service#56

Merged
mdwigley merged 1 commit intoenterlucent:mainfrom
mdwigley:issue#55-mdwigley
Feb 21, 2026
Merged

Adding Scrollable TextBlock Control with Font Service#56
mdwigley merged 1 commit intoenterlucent:mainfrom
mdwigley:issue#55-mdwigley

Conversation

@mdwigley
Copy link
Member

Description

This pull request introduces a new TextBlock control with configurable typography, wrapping behavior, outline rendering, and integrated scrollbar support.

The implementation includes a reusable font service for managing font instances, a FontMetrics model for outline-aware measurement, and a text layout engine capable of pixel-accurate soft and hard wrapping. Rendering is optimized using line-level layout caching and per-line texture caching limited to the visible viewport.

Core rendering utilities have been extended to support font surface creation, texture composition (outline and foreground passes), cropping for horizontal scroll, and line measurement helpers. The control integrates fully with the framework’s measure, arrange, and render lifecycle and properly manages SDL resource cleanup.

Related Issue

Motivation and Context

The framework previously lacked a dedicated, scrollable, and styleable text rendering control. This change establishes foundational text infrastructure, enabling consistent typography configuration, wrapping behavior, and scroll-aware rendering within UI layouts.

It also centralizes font management and measurement logic, reducing duplication and improving extensibility for future text-based controls.

How Has This Been Tested?

  • Verified the project builds successfully without compilation errors.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Asset change (adds or updates icons, templates, or other assets)
  • Documentation change (adds or updates documentation)
  • Plugin change (adds or updates a plugin)

Checklist:

  • I have read the CONTRIBUTING document.
  • My change requires a change to the core logic.
    • I have linked the project issue above.
  • My change requires a change to the assets.
    • I have linked the asset issue above.
  • My change requires a change to the documentation.
    • I have linked the documentation issue above.
  • My change requires a change to a plugin.
    • I have linked the plugin issue above.

@mdwigley mdwigley added this to the Core Controls Library milestone Feb 21, 2026
@mdwigley mdwigley self-assigned this Feb 21, 2026
@mdwigley mdwigley added the approved Change issue has been accepted for implementation label Feb 21, 2026
@mdwigley mdwigley moved this to In review in PhotonUI Timeline Feb 21, 2026
@mdwigley mdwigley merged commit 145e05f into enterlucent:main Feb 21, 2026
3 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in PhotonUI Timeline Feb 21, 2026
@mdwigley mdwigley deleted the issue#55-mdwigley branch February 21, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Change issue has been accepted for implementation

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Scrollable TextBlock Control with Font Service

1 participant