Order it now! Amazon prioritizes orders on a first come, first served basis.


View Full Version : limit hyphenation


red_dragon
02-23-2009, 06:02 AM
An easy workaround for the hyphenation problem (see also the entry in the ->Hanlin Forum (http://www.mobileread.com/forums/showthread.php?t=39827)) could be to not hyphenate words that contain less than 5 characters (or make this configurable using word / subword length).

I have checked the source code in the original fbReader 0.10.3 release. The file where the changes have to be implemented could be "zlibrary/text/src/view/ZLTextLineProcessor.cpp" (line 228 - 242) or directly in "zlibrary/text/src/hyphenation/ZLTextHyphenator.cpp" (the "info" method).

Maybe someone can have a look at it...

dottedmag
02-23-2009, 06:46 AM
Please open a ticket or it this stuff will be forgotten.

red_dragon
02-27-2009, 10:22 AM
I did some more checks and downloaded the source code of fbreader. The program uses indeed the TeX algorithm, which under normal circumstances works great. So the problem is not the hyphenation algorithm but the detection of the language. Depending on the language the hyphenation will differ so if the wrong language is picked you will get a badly formated output. You can try it in the online hyphenator (http://www.ushuaia.pl/hyphen/?ln=en) (e.g. "clear").

In the latest OpenInkpot snapshot it's possible to correct the language. Once I did this, everything started to work perfectly!

No need to change anything. :)