Skip to content

Add WordBreaking.BreakWord option - #341

Merged
JimBobSquarePants merged 4 commits into
mainfrom
js/break-word
Jul 8, 2023
Merged

Add WordBreaking.BreakWord option#341
JimBobSquarePants merged 4 commits into
mainfrom
js/break-word

Conversation

@JimBobSquarePants

@JimBobSquarePants JimBobSquarePants commented Jul 8, 2023

Copy link
Copy Markdown
Member

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following matches the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

Fixes #330

Adds a new WordBreaking.BreakWord option which matches the output behavior of CSS word-break: break-word. This is the closest behavior to WinForms/Wpf/MS-Word.

This option is a combination of Standard and BreakAll working in that explicit oder.

Measuring tests have been added to existing text layout tests. Rendered output is as follows.

abcdef ghijk lmnopq rstuvwxyz
abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz--abcdefghijklmnopqrstuvwxyz
THISIS~1

@JimBobSquarePants JimBobSquarePants added this to the 1.0.0 milestone Jul 8, 2023
FontFamily arabicFont = SystemFonts.Get("Dubai");

FontFamily tahoma = SystemFonts.Get("Tahoma");

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ignore this stuff. I plan on creating a clean sample project to demonstrate multiple features.

@JimBobSquarePants
JimBobSquarePants merged commit 9b00ed7 into main Jul 8, 2023
@JimBobSquarePants
JimBobSquarePants deleted the js/break-word branch July 8, 2023 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Problem with wrapping long words

2 participants