Skip to content

feat: implement MSDF text rendering components and tests - #7

Merged
isrcalebe merged 1 commit into
developfrom
feature/textbuilder
Sep 21, 2026
Merged

isrcalebe merged 1 commit into
developfrom
feature/textbuilder

Conversation

@isrcalebe

@isrcalebe isrcalebe commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Adds MsdfTextFlowContainer and the supporting text-part abstractions required for flow-based MSDF text layout.

The implementation mirrors the behaviour of osu!framework's TextFlowContainer while using MsdfSpriteText as the underlying text drawable.

Changes

  • add MsdfTextFlowContainer

    • word wrapping and line breaking
    • paragraph and line spacing
    • first-line and content indentation
    • text anchoring
    • automatic sizing and constrained flow width
    • baseline-aware vertical alignment
    • manual drawable insertion alongside generated text
  • add text part abstractions

    • IMsdfTextPart
    • MsdfTextPart
    • MsdfTextChunk
    • MsdfTextNewLine
    • MsdfTextPartManual
  • add text splitting support for:

    • whitespace and control characters
    • punctuation and hyphenated text
    • URLs and filesystem paths
    • CJK characters
  • support localised text through LocalisableString and LocalisationManager

Testing

Adds a visual comparison scene between TextFlowContainer and MsdfTextFlowContainer, covering:

  • multi-line and multi-paragraph text
  • explicit line and paragraph breaks
  • text anchoring
  • first-line/content indentation
  • line and paragraph spacing
  • CJK text
  • URLs and paths
  • mixed manual and generated text
  • baseline alignment with different font sizes
  • interactive zoom and pan comparison

@isrcalebe
isrcalebe merged commit 79e23a3 into develop Sep 21, 2026
8 checks passed
@isrcalebe
isrcalebe deleted the feature/textbuilder branch September 21, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant