feat: Add ability to wrap text to UI elements#911
Closed
lkristensen wants to merge 2 commits intocrosspoint-reader:masterfrom
Closed
feat: Add ability to wrap text to UI elements#911lkristensen wants to merge 2 commits intocrosspoint-reader:masterfrom
lkristensen wants to merge 2 commits intocrosspoint-reader:masterfrom
Conversation
added 2 commits
February 16, 2026 07:38
New function "wrappedText" added to the GfxRenderer Similarly to how truncatedText it will take a text string and a width and return a truncated string, this function will wrap the text into a vector of strings. A maximum number of lines is specified, and the rest of the text (if any) is truncated using truncatedText The function only wraps on spaces, as rules for how words are split varies by language.
Merged
This was referenced Feb 22, 2026
ngxson
pushed a commit
that referenced
this pull request
Feb 25, 2026
## Summary * **What is the goal of this PR?** (e.g., Implements the new feature for file uploading.) * **What changes are included?** Conrgegate the changes of #1074 , #1013 , and extended upon #911 by @lkristensen New function implemented in GfxRenderer.cpp ```C++ std::vector<std::string> GfxRenderer::wrappedText(const int fontId, const char* text, const int maxWidth, const int maxLines, const EpdFontFamily::Style style) const ``` Applied logic to all uses in Lyra, Lyra Extended, and base theme (continue reading card as pointed out by @znelson ## Additional Context    --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**< YES >**_ --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
el
pushed a commit
to el/crosspoint-reader
that referenced
this pull request
Feb 26, 2026
…oint-reader#1141) ## Summary * **What is the goal of this PR?** (e.g., Implements the new feature for file uploading.) * **What changes are included?** Conrgegate the changes of crosspoint-reader#1074 , crosspoint-reader#1013 , and extended upon crosspoint-reader#911 by @lkristensen New function implemented in GfxRenderer.cpp ```C++ std::vector<std::string> GfxRenderer::wrappedText(const int fontId, const char* text, const int maxWidth, const int maxLines, const EpdFontFamily::Style style) const ``` Applied logic to all uses in Lyra, Lyra Extended, and base theme (continue reading card as pointed out by @znelson ## Additional Context    --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**< YES >**_ --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Author
|
Closed as it has been merged as part of 1074 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
New function "wrappedText" added to the GfxRenderer
Similarly to how truncatedText it will take a text string and a width and return a truncated string, this function will wrap the text into a vector of strings. A maximum number of lines is specified, and the rest of the text (if any) is truncated using truncatedText
The function only wraps on spaces, as rules for how words are split varies by language.
Additional Context
specific areas to focus on).
This was requested by CaptainFrito in 732.
As part of the lyra theme.

Before:
After:

AI Usage
While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it
helps set the right context for reviewers.
Did you use AI tools to help write this code? Used chatgpt to validate that std::vectorstd::string was an appropriate return type