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

Incorrect word wrapping around punctuation marks and furigana #254

Open
uunniiblog opened this issue Jul 31, 2023 · 2 comments
Open

Incorrect word wrapping around punctuation marks and furigana #254

uunniiblog opened this issue Jul 31, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@uunniiblog
Copy link

It seems ttu is doing some weird word wrapping when the new line starts with some punctuation mark like "。、・・・?「」" and so on. When it has a punctuation mark going over a new line it's removing the last moji in the line and adding it to the new one leaving an awkward blank space at the end of the last line
for example:
https://i.imgur.com/ukl8pCy.jpg or https://i.imgur.com/2IgvMyq.jpg

This also seems to happen when there are no punctuation marks but the word going over the next line has furigana over it: https://i.imgur.com/GSv7YG8.jpg

Would be nice if there was a way (or toggle to choose) to have it behave like Japanese books do where if a new line would be to start with a punctuation mark it still gets added to the end of the last line instead of having blank spaces. Example from a physical book: https://i.imgur.com/l4XbZL5.jpg

Other software like Kindle also displays this correctly: https://i.imgur.com/jtlgqh1.jpg I'm assuming what they do is that the last one or two moji space for each line is hidden and not usable by anything but punctuation mark

@Renji-XD
Copy link
Collaborator

Renji-XD commented Jul 31, 2023

Hi,

you could test with with an extension if adding "word-break: keep-all;" as style to the main div container suits more your preference (though it will probably leave more space open across the page / do other breaks you don't like)

Rather than that i think its pretty limited in how the browser rendering can be influenced on this detail level and other options on js level are to heavy / not in my personal interest

Feel free to comment on the outcome of your test but this is probably the max i personally would add (though i leave it open in case someone else wants to take over / comment on other alternatives)

@Renji-XD Renji-XD added the enhancement New feature or request label Jul 31, 2023
@uunniiblog
Copy link
Author

Hey thanks for answering, I just tried the keep-all option but like you said it isn't also very good and it starts new lines with punctuation marks which it's also wrong :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants