View Single Post
Old 03-10-2023, 09:41 AM   #22
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,849
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Tex2002ans View Post
And once I began messing around a lot more with Auto-Translation and features like that, I'm always leery on how those will interact with:
  • Device/Browser hyphenation
  • + Javascript hyphenation on top.

(Like let's say you have German text that you Auto-Translate to English. Will the (javascript) hyphenator still be applying German hyphenation to it?)
When you add the Hyphenator script (that is deprecated), you also must add the pattern files that contains the rules to hyphenate the text. For example, if you want to hyphenate german text, besides the script, it must be included the file "de.js". If besides german text, you also want to hyphen english text, the file "en-us.js" also must be included. You can include all the pattern files you wish. German text gains a lot with hyphens. For example, some time ago, Doitsu uploaded a german epub3 called "Čapek, Karel: Der gestohlene Kaktus"; that epub has all the text aligned to left. Well, I took that epub and I added "hyphenator.js" and "de.js" so hyphens where enabled. You can see how better looks the things (and also to watch how easy is to add hyphens with javascript).

Čapek,_Karel-Der_gestohlene_Kaktus.epub

Quote:
What was the "serious" issues happening with Calibre's Viewer?
Judge by yourself. Open the epub I attached in Calibre Viewer and try to pass all the pages one by one.

The problem with Hyphenator.js is that the script adds soft hyphens like "Hyphenate this" and so, it has the same issues with searching and TTS. On the other hand, Hyphenopoly.js adds an "aria-label" that would avoid those drawbacks.

Regrettably, not many programs and apps have a built-in hyphenator. For example, they can't hyphenate by themself THORIUM (!), Koodo (another great ereader for both Windows and Linux), Reasily, Lithium, Aldiko Next, Overdrive, Google Play, BookFusion, Infinity Reader and and the list goes on (the only ereader so far I found perfect was Foliate, for Linux). On Aldiko Next, for example, Hyphenator works great (no issue with searching and TTS) but on Reasily, it has issues with searching. Hyphenopoly theorically would solve the problems, but i cant get it to work on epubs because it doesn't recognize the user agent (maybe if I can fake the user agent, I can get something). Hyphenoly first tries to see if there is native support for hyphens; if so, then does nothing; on the contrary, adds soft hyphens with an aria-label to avoid issues with searching and TTS.

Last edited by RbnJrg; 03-10-2023 at 05:33 PM.
RbnJrg is offline   Reply With Quote