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
Subtitles without spaces do not break to a new line when overfull #360
Comments
Found this function while investigating this myself: Line 1588 in 6a670b4
I'd implement line breaking so that first priority would be for spaces as listed here, and if the line would still be too long I would break before any CJK character that goes above However, I see the problem that the function loops the text char by char instead of unicode characters. I'm not sure if it can be assumed to be UTF-8. |
It's definitely UTF-8, except when it's not. The latter could happen if an .ass file contains invalid UTF-8 sequences, but then libass doesn't need to render anything sane. But it shouldn't crash or so. |
PS: if you haven't seen it yet, |
It's pretty common (in Chinese/Japanese/Korean especially) to not have any spaces to split on. Currently, these cases simply overflow the render area. If this happens, try a last ditch attempt to wrap at the last character seen. This dramatically improves the usability of long subtitles with no clear break point. As opposed to libass#372, which is CJK-specific and seems pretty stalled, this pull request is much simpler: we just split in any case where we will overflow the buffer as a last resort. Cases like mpv-player/mpv#8115 demonstrate demand for this even outside of CJK character context. Example previous issues which show demand for this behaviour: - mpv-player/mpv#8115 - mpv-player/mpv#2203 - libass#348 - libass#360
It's pretty common (in Chinese/Japanese/Korean especially) to not have any spaces to split on. Currently, these cases simply overflow the render area. If this happens, try a last ditch attempt to wrap at the last character seen. This dramatically improves the usability of long subtitles with no clear break point. As opposed to libass#372, which is CJK-specific and seems pretty stalled, this pull request is much simpler: we just split in any case where we will overflow the buffer as a last resort. Cases like mpv-player/mpv#8115 demonstrate demand for this even outside of CJK character context. Example previous issues which show demand for this behaviour: - mpv-player/mpv#8115 - mpv-player/mpv#2203 - libass#348 - libass#360
It's pretty common (in Chinese/Japanese/Korean especially) to not have any spaces to split on. Currently, these cases simply overflow the render area. If this happens, try a last ditch attempt to wrap at the last character seen. This dramatically improves the usability of long subtitles with no clear break point. As opposed to libass#372, which is CJK-specific and seems pretty stalled, this pull request is much simpler: we just split in any case where we will overflow the buffer as a last resort. Cases like mpv-player/mpv#8115 demonstrate demand for this even outside of CJK character context. Example previous issues which show demand for this behaviour: - mpv-player/mpv#8115 - mpv-player/mpv#2203 - libass#348 - libass#360
It's pretty common (in Chinese/Japanese/Korean especially) to not have any spaces to split on. Currently, these cases simply overflow the render area. If this happens, try a last ditch attempt to wrap at the last character seen. This dramatically improves the usability of long subtitles with no clear break point. As opposed to libass#372, which is CJK-specific and seems pretty stalled, this pull request is much simpler: we just split in any case where we will overflow the buffer as a last resort. Cases like mpv-player/mpv#8115 demonstrate demand for this even outside of CJK character context. Example previous issues which show demand for this behaviour: - mpv-player/mpv#8115 - mpv-player/mpv#2203 - libass#348 - libass#360
It's pretty common (in Chinese/Japanese/Korean especially) to not have any spaces to split on. Currently, these cases simply overflow the render area. If this happens, try a last ditch attempt to wrap at the last character seen. This dramatically improves the usability of long subtitles with no clear break point. Comapred to libass#372, which is CJK-specific and seems pretty stalled, this pull request is much simpler (but complementary): we just split in any case where we will overflow the buffer as a last resort. Cases like mpv-player/mpv#8115 demonstrate demand for this even outside of CJK character context. Example previous issues which show demand for this behaviour: - mpv-player/mpv#8115 - mpv-player/mpv#2203 - libass#348 - libass#360
It's pretty common (in Chinese/Japanese/Korean especially) to not have any spaces to split on. Currently, these cases simply overflow the render area. If this happens, try a last ditch attempt to wrap at the last character seen. This dramatically improves the usability of long subtitles with no clear break point. Comapred to libass#372, which is CJK-specific and seems pretty stalled, this pull request is much simpler (but complementary): we just split in any case where we will overflow the buffer as a last resort. Cases like mpv-player/mpv#8115 demonstrate demand for this even outside of CJK character context. Example previous issues which show demand for this behaviour: - mpv-player/mpv#8115 - mpv-player/mpv#2203 - libass#348 - libass#360
It's pretty common (in Chinese/Japanese/Korean especially) to not have any spaces to split on. Currently, these cases simply overflow the render area. If this happens, try a last ditch attempt to wrap at the last character seen. This dramatically improves the usability of long subtitles with no clear break point. Comapred to libass#372, which is CJK-specific and seems pretty stalled, this pull request is much simpler (but complementary): we just split in any case where we will overflow the buffer as a last resort. Cases like mpv-player/mpv#8115 demonstrate demand for this even outside of CJK character context. Example previous issues which show demand for this behaviour: - mpv-player/mpv#8115 - mpv-player/mpv#2203 - libass#348 - libass#360
It's pretty common (in Chinese/Japanese/Korean especially) to not have any spaces to split on. Currently, these cases simply overflow the render area. If this happens, try a last ditch attempt to wrap at the last character seen. This dramatically improves the usability of long subtitles with no clear break point. Comapred to libass#372, which is CJK-specific and seems pretty stalled, this pull request is much simpler (but complementary): we just split in any case where we will overflow the buffer as a last resort. Cases like mpv-player/mpv#8115 demonstrate demand for this even outside of CJK character context. Example previous issues which show demand for this behaviour: - mpv-player/mpv#8115 - mpv-player/mpv#2203 - libass#348 - libass#360
It's pretty common (in Chinese/Japanese/Korean especially) to not have any spaces to split on. Currently, these cases simply overflow the render area. If this happens, try a last ditch attempt to wrap at the last character seen. This dramatically improves the usability of long subtitles with no clear break point. Comapred to libass#372, which is CJK-specific and seems pretty stalled, this pull request is much simpler (but complementary): we just split in any case where we will overflow the buffer as a last resort. Cases like mpv-player/mpv#8115 demonstrate demand for this even outside of CJK character context. Example previous issues which show demand for this behaviour: - mpv-player/mpv#8115 - mpv-player/mpv#2203 - libass#348 - libass#360
It's pretty common (in Chinese/Japanese/Korean especially) to not have any spaces to split on. Currently, these cases simply overflow the render area. If this happens, try a last ditch attempt to wrap at the last character seen. This dramatically improves the usability of long subtitles with no clear break point. Comapred to libass#372, which is CJK-specific and seems pretty stalled, this pull request is much simpler (but complementary): we just split in any case where we will overflow the buffer as a last resort. Cases like mpv-player/mpv#8115 demonstrate demand for this even outside of CJK character context. Example previous issues which show demand for this behaviour: - mpv-player/mpv#8115 - mpv-player/mpv#2203 - libass#348 - libass#360
It's pretty common (in Chinese/Japanese/Korean especially) to not have any spaces to split on. Currently, these cases simply overflow the render area. If this happens, try a last ditch attempt to wrap at the last character seen. This dramatically improves the usability of long subtitles with no clear break point. Comapred to libass#372, which is CJK-specific and seems pretty stalled, this pull request is much simpler (but complementary): we just split in any case where we will overflow the buffer as a last resort. Cases like mpv-player/mpv#8115 demonstrate demand for this even outside of CJK character context. Example previous issues which show demand for this behaviour: - mpv-player/mpv#8115 - mpv-player/mpv#2203 - libass#348 - libass#360
It's pretty common (in Chinese/Japanese/Korean especially) to not have any spaces to split on. Currently, these cases simply overflow the render area. If this happens, try a last ditch attempt to wrap at the last character seen. This dramatically improves the usability of long subtitles with no clear break point. Compared to libass#372, which is CJK-specific, this pull request is much simpler (but complementary): we just split in any case where we will overflow the buffer as a last resort. Cases like mpv-player/mpv#8115 demonstrate demand for this even outside of CJK character context. Example previous issues which show demand for this behaviour: - mpv-player/mpv#8115 - mpv-player/mpv#2203 - libass#348 - libass#360
It's pretty common (in Chinese/Japanese/Korean especially) to not have any spaces to split on. Currently, these cases simply overflow the render area. If this happens, try a last ditch attempt to wrap at the last character seen. This dramatically improves the usability of long subtitles with no clear break point. Compared to libass#372, which is CJK-specific, this pull request is much simpler (but complementary): we just split in any case where we will overflow the buffer as a last resort. Cases like mpv-player/mpv#8115 demonstrate demand for this even outside of CJK character context. Example previous issues which show demand for this behaviour: - mpv-player/mpv#8115 - mpv-player/mpv#2203 - libass#348 - libass#360
It's pretty common (in Chinese/Japanese/Korean especially) to not have any spaces to split on. Currently, these cases simply overflow the render area. If this happens, try a last ditch attempt to wrap at the last character seen. This dramatically improves the usability of long subtitles with no clear break point. Compared to libass#372, which is CJK-specific, this pull request is much simpler (but complementary): we just split in any case where we will overflow the buffer as a last resort. Cases like mpv-player/mpv#8115 demonstrate demand for this even outside of CJK character context. Example previous issues which show demand for this behaviour: - mpv-player/mpv#8115 - mpv-player/mpv#2203 - libass#348 - libass#360
It's pretty common (in Chinese/Japanese/Korean especially) to not have any spaces to split on. Currently, these cases simply overflow the render area. If this happens, try a last ditch attempt to wrap at the last character seen. This dramatically improves the usability of long subtitles with no clear break point. Compared to libass#372, which is about Unicode line breaking, this pull request is much simpler (but complementary): we just split in any case where we will overflow the buffer as a last resort. Example previous issues which show demand for this behaviour: - mpv-player/mpv#8115 - mpv-player/mpv#2203 - libass#348 - libass#360
It's pretty common (in Chinese/Japanese/Korean especially) to not have any spaces to split on. Currently, these cases simply overflow the render area. If this happens, try a last ditch attempt to wrap at the last character seen. This dramatically improves the usability of long subtitles with no clear break point. Compared to libass#372, which is about Unicode line breaking, this pull request is much simpler (but complementary): we just split in any case where we will overflow the buffer as a last resort. Example previous issues which show demand for this behaviour: - mpv-player/mpv#8115 - mpv-player/mpv#2203 - libass#348 - libass#360
It's pretty common (in Chinese/Japanese/Korean especially) to not have any spaces to split on. Currently, these cases simply overflow the render area. If this happens, try a last ditch attempt to wrap at the last character seen. This dramatically improves the usability of long subtitles with no clear break point. Compared to libass#372, which is about Unicode line breaking, this pull request is much simpler (but complementary): we just split in any case where we will overflow the buffer as a last resort. Example previous issues which show demand for this behaviour: - mpv-player/mpv#8115 - mpv-player/mpv#2203 - libass#348 - libass#360
by way of mpv-player/mpv#7158 :
See e.g. at 43:00 in sub.ass with a large font size:
(Many lines in the subtitles do indeed have spaces between short phrases, which is an exeption to the rule in East Asian scripts.)
The text was updated successfully, but these errors were encountered: