07-16-2020, 04:30 AM | #1 |
Member
Posts: 12
Karma: 10
Join Date: Jul 2020
Device: Kobo Clara HD
|
Does hyphenation work or not?
After a first feeling of triumph from successfully enabling Swedish hyphenation on my Kobo (by adding a new hyph_sv_SE.dic file onto it) I gradually became more and more distracted by obvious hyphenation errors (for instance förm-ögenhet instead of för-mögenhet or anmärkn-ing instead of anmärk-ning).
At first I blamed the .dic files I had aquired so I spent days making my own, but errors of the same kind were still made. Now before spending more time trying to fix this I would like to know: is it even possible to get correct hyphenation on Kobo. I looked in an English book that's on my Kobo and it seems to have correct hyphenations (I did find one possible error: untrac-table instead of untract-able, but I am not sure about that one) which indicates that it might indeed be possible. What's the current consensus on this subject? |
07-16-2020, 04:57 AM | #2 | |
Connoisseur
Posts: 58
Karma: 2112464
Join Date: Aug 2014
Device: Kobo Glo HD
|
Quote:
Problem was even worse in French, since words tend to be longer than English ones, thus leading more frequent hyphens. Don't know about swedish, but it could have a similar issue. Turned out that justified text with no hyphenation is good enough unless you have a very big font size. I find to occasional overstretched line to be less annoying that wrong hyphens. Also, if you want to avoid hyphens and over-stretched spaces, one solution is to set you device in Landscape mode (it can be enable through a firmware patch, easy enough). Last edited by Simboubou; 07-16-2020 at 05:13 AM. |
|
Advert | |
|
07-16-2020, 05:10 AM | #3 |
Member
Posts: 12
Karma: 10
Join Date: Jul 2020
Device: Kobo Clara HD
|
I see.
Yes, Swedish has a lot of long words so without hyphenation there are a lot of stretched lines, which I find distracting (but, like you, not as distracting as hyphenation errors). Did you experience the errors in English too, or just French? |
07-16-2020, 05:24 AM | #4 |
Connoisseur
Posts: 58
Karma: 2112464
Join Date: Aug 2014
Device: Kobo Glo HD
|
French was definitely worse, but English was not perfect either. I read a few chapters of the Lord of the Rings with hyphens and it was okayish, but I eventually went back to no-hyphens.
One thing I noticed is that all the english hyphens dict that I could find were much longer than french ones. So maybe the english ones are more complete, I don't know. Here are some things you can try:
|
07-16-2020, 10:41 AM | #5 |
Resident Curmudgeon
Posts: 76,495
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Are you reading ePub or KePub? If it's KePub, then hyphenation can be spotty depending on the hyphenation dictionary settings. if it is KePub, try ePub. If it is ePub, what are the hyphenation left/right settings in the dictionary file?
|
Advert | |
|
07-16-2020, 10:51 AM | #6 |
Zealot
Posts: 105
Karma: 37418
Join Date: Jan 2013
Device: Kobo Glo, Aura, H2OE2, Libra 2
|
Have you checked the language code you've used in the hyph_??.dic file name is the same as that in your books metadata (content.opf file).
|
07-16-2020, 11:35 AM | #7 |
Grand Sorcerer
Posts: 6,224
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
I'm no expert in hyphenation issues but, offhand, I can't remember anyone talking about successfully installing a hyphenation dictionary for a language which is not in Kobo's built-in supported language list. Quite a lot is known and documented about how to make custom lookup/translation dictionaries work, but not custom hyphenation dictionaries.
The successes I have read about are when someone has improved one of the 8 standard Kobo languages, e.g. hyph_en.dic. Also, I'm not sure that it's as simple as just adding a new file to the /usr/local/Kobo/hyphenDicts directory. There appear to be some related entries in /usr/share/hyphen, maybe other places, too. This is less than ideal but have you tried renaming your custom hyphenation dictionary to one of the default language names that you'll never want to use? Unfortunately you'd also need to change the language to match in each of your epub/kepubs. Hopefully, someone with more expertise will chip in soon. Last edited by jackie_w; 07-16-2020 at 11:38 AM. |
07-16-2020, 11:50 AM | #8 | ||
Member
Posts: 12
Karma: 10
Join Date: Jul 2020
Device: Kobo Clara HD
|
Quote:
Quote:
No, I haven't, but obviously, considering the amount of suggestions I've received, there seems to be a lot of things to try. |
||
07-16-2020, 11:53 AM | #9 |
Wizard
Posts: 2,792
Karma: 6990707
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
Has anyone tried using ExtraLocales in the config file? This appears to apply to everywhere a language list is needed.
|
07-16-2020, 01:18 PM | #10 | |
Running with scissors
Posts: 1,557
Karma: 14325282
Join Date: Nov 2019
Device: none
|
Quote:
You didn't include my favorite solution which is to "fix" the CSS and change it to ragged-right instead of justified; i.e., text-align:left instead of text-align:justified. For the Kobo you can just delete all text-align:justified (i.e., no need for text-align:left, but leave the ones that are right and center) and then you can select either ragged right or justified in the Kobo's font menu. Last edited by hobnail; 07-16-2020 at 01:22 PM. |
|
07-16-2020, 03:58 PM | #11 | |
Resident Curmudgeon
Posts: 76,495
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Using the better English hyphenation dictionary I posted int he Kobo Developer forum, you do get much better hyphenation. I'm going to play with it some and see how I get on. Last edited by JSWolf; 07-16-2020 at 04:00 PM. |
|
07-16-2020, 04:17 PM | #12 |
Fanatic
Posts: 599
Karma: 641742
Join Date: Mar 2012
Location: DE
Device: Kobo Glo
|
It is impossilbe to get (perfectly) correct hyphenation files, but maybe you can find updated/improved hypenation files from LibreOffice or OpenOffice.
Add the following to the .dic (after UTF-8): Code:
LEFTHYPHENMIN 3 RIGHTHYPHENMIN 3 This prevents breaking shorter words: jus-tificat-ion, jus-tificati-on. This doesn't fix breaking words at the correct position. Note: interpunction is also 'counted' as a character. Example: Code:
UTF-8 LEFTHYPHENMIN 3 RIGHTHYPHENMIN 3 .a4 .aan5 .a4a4 … and change the symlink too. Use 7-zip so you can drag and drop a hyphenation file in Code:
\usr\local\Kobo\hyphenDicts\ Code:
\usr\share\hyphen\ |
07-17-2020, 08:23 AM | #13 | |
Member
Posts: 12
Karma: 10
Join Date: Jul 2020
Device: Kobo Clara HD
|
Does anyone know if the Kobo fully supports the .dic format? That is, every instruction that's possible in the .dic file is also understood by the Kobo. And does someone have a link to a page that explains how the patterns are constructed – for instance, what ".aan5" means?
I have a hard time believing that the .dic files I've tried would allow for such glaring mistakes as the ones I discovered, which leads me to believe that the Kobo isn't listening to what the .dic file really says, but it's hard for me to know if I don't know exactly how that file is constructed. Or maybe it's because Swedish is not one of the listed languages, I will try to replace one of the official .dic files and see if the result differs. Quote:
|
|
07-17-2020, 01:16 PM | #14 | |
Resident Curmudgeon
Posts: 76,495
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
With ePub, 3/3 is 3/3. With KePub, 3/3 is really 2/2. So to do 2/3 with KePub you want 3/4 and for ePub you want 2/3. |
|
07-17-2020, 01:52 PM | #15 | |
Member
Posts: 12
Karma: 10
Join Date: Jul 2020
Device: Kobo Clara HD
|
Quote:
(Of course, I do realize that they're in fact following someone's instructions to not follow instructions... even more frustrating!) OK, so with KePub, 3/3 is really 2/2, but if a word contains a comma at the end, does that in fact mean 2/1, if the comma counts as one? |
|
Tags |
hyphenation, kobo |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Hyphenation | skr1107 | Calibre | 1 | 09-27-2018 12:28 PM |
Hyphenation | Simboubou | PocketBook | 9 | 09-15-2014 06:21 AM |
Hyphenation does not work in E-book Viewer | Elancrom | Calibre | 2 | 06-18-2014 07:19 AM |
Hyphenation | Siard | Kobo Reader | 6 | 08-09-2013 08:40 AM |
hyphenation | CPatrick | OpenInkpot | 3 | 03-22-2010 07:06 AM |