Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better text wrapping #178

Merged
merged 5 commits into from
Jul 2, 2024
Merged

Conversation

emericklaw
Copy link
Contributor

Description

Text was being wrapped in the middle of words.

Updated version only splits on spaces and if there is a word longer than will fit on one line then the word is hyphenated.

I would love to get the wrapping to work within a circular boundary but that will have to wait for another day!

Normal Text - Before

Normal Text - Before

Normal Text - After

Normal Text - After

Long Word - Before

Long Word - Before

Long Word - After

Long Word - After

Settings - Before

Settings - Before

Settings - After

Settings - After

Copy link
Contributor

@npentrel npentrel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good though I haven't tested it yet. I do think we should make hyphenation configurable. There may be cases in which adding a hyphen would be confusing. Displaying the WiFi ssid or password for example.

Copy link
Contributor

@npentrel npentrel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tested, and will merge and address making the line wrapping character configurable separately

@npentrel npentrel merged commit 4f094be into emfcamp:main Jul 2, 2024
3 checks passed
@npentrel
Copy link
Contributor

npentrel commented Jul 2, 2024

Thank you @emericklaw

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.

None yet

2 participants