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

Question/Request about autobreak rule #9235

Open
miguelfs opened this issue Jan 17, 2025 · 0 comments
Open

Question/Request about autobreak rule #9235

miguelfs opened this issue Jan 17, 2025 · 0 comments

Comments

@miguelfs
Copy link

miguelfs commented Jan 17, 2025

Hi, Nikolaj.

Thanks for creating and maintaining this application.

My wife works with professional subtitling for years, so this application had positive impact in her career, so we are both thankful.


About autobreak feature: Is there a way to use, at the same time, the current available custom regex autobreak rules while ALSO keeping some sort of width control at the broken lines?

Image

To give a practical example, consider the sentence: "I am what I am supposed to do every day". By adding a single autobreak regex \b(am)\b, the auto break would pick the first match. The output would be:

I am
what I am supposed to do every day

Ticking those two options ( use do-not-break-after list and Break by pixel width ) makes only the first one to prevail.

What we are looking for is a way that:

  • autobreak internally makes all possible break combinations for the sentence (in our example, two options)
  • after generating the options, the 2-line sentence with the less width difference between them is the ONE to be automatically picked, so the output would be:
I am what I am
supposed to do everyday

Is it currently possible? if not, is it worth opening a PR with this feature? Or a custom plugin would be better?

Thanks in advance.

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

No branches or pull requests

1 participant