You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature Request: New Line Break Strategy for Languages Without Spaces
Summary
Currently, the library provides two line break strategies:
EmptySpaceStrategy: This strategy counts the length of words to create a new line and is designed for languages that use spaces to divide words.
DashStrategy: This strategy counts the length for a set of characters and applies a dash at the end of the line. It is useful for languages that do not use spaces between words.
However, there are languages, such as Chinese, where characters do not use spaces or special characters to separate them. As a result, the existing strategies may not be suitable for handling line breaks effectively in these languages.
Proposal
I propose the addition of a new line break strategy that specifically caters to languages like Chinese, where:
Characters are standalone and do not require special characters for separation.
The line break logic should be based on character count or other relevant metrics that respect the linguistic structure of such languages.
Example
For instance, consider the following Chinese text:
With the proposed strategy, the text could be broken into lines like this:
Feature Request: New Line Break Strategy for Languages Without Spaces
Summary
Currently, the library provides two line break strategies:
However, there are languages, such as Chinese, where characters do not use spaces or special characters to separate them. As a result, the existing strategies may not be suitable for handling line breaks effectively in these languages.
Proposal
I propose the addition of a new line break strategy that specifically caters to languages like Chinese, where:
Example
For instance, consider the following Chinese text:
With the proposed strategy, the text could be broken into lines like this:
The text was updated successfully, but these errors were encountered: