readium / readium-css

🌈 A set of reference stylesheets for EPUB Reading Systems, starting with Readium Mobile
https://readium.org/readium-css/
BSD 3-Clause "New" or "Revised" License
89 stars 20 forks source link

Overflow on long words #129

Open NikolajHarderNota opened 10 months ago

NikolajHarderNota commented 10 months ago

I'm experiencing an issue where zooming in will cause long words to overflow to the next page, this happens when the word is too long to fit on a single line.

Our use-case is an app made in Flutter, running on both ios and android. The problem is present on both platforms and happens with every EPUB I've tried.

Adding "hyphens: auto;" is a decent fix on android, but has no effect on ios. Adding "word-wrap: break-word;" does fix the overflow issue. But not very well, as words will split in weird places.

Is there a suggested way to handle this?

![nowordsplit](https://github.com/readium/readium-css/assets/113669907/cd63b791-f221-4a23-8bb9-928b91d11469

danielweck commented 1 month ago

From https://github.com/edrlab/thorium-reader/issues/1906 by @gautierchomel

See capture

Capture-20230117103121-1880x484

And code:

<li class="nodisc"><cite class="references-ressources" lang="en-GB" xml:lang="en-GB">Danielsen, C. (2007). What it means to walk with a white cane. Braille Monitor. [En ligne] https://nfb.org/images/nfb/publications/bm/bm07/bm0702/bm070205.htm</cite></li>
<li class="nodisc"><cite class="references-ressources" lang="en-GB" xml:lang="en-GB">Davies, T. (2008). Audification of ultrasound for human echolocation. (Unpublished doctoral thesis). [En ligne] https://uwspace_uwaterloo.ca/bitstream/10012/3878/1/TCDavies%20final%20thesis%20August22.pdf</cite></li>
danielweck commented 1 month ago

Also ... well, &nbsp; means non-breaking space after all :)

Screenshot 2023-07-19 at 19 07 03 Screenshot 2023-07-19 at 19 07 27 Screenshot 2023-07-19 at 19 08 38
danielweck commented 1 month ago

from @mickael-menu https://github.com/readium/readium-css/issues/127

I'm submitting a bug report

Short description of the issue/suggestion:

Long hyperlinks overlap on the next column, instead of being wrapped.

Steps to reproduce the issue/enhancement:

Unfortunately I cannot provide a free sample book. Contact me for exchanging it privately (note to self APP-428).

Do you have screenshots, GIFs, demos or samples which demonstrate the problem or enhancement?

Screenshot 2023-06-09 at 14 43 01
gautierchomel commented 1 month ago

On the creator side, there is a way by adding <wbr> Tag.