
On 9/21/09, Santhosh Thottingal <santhosh.thottingal@...400...> wrote:
This is regarding a wishlist bug reported here; https://bugs.launchpad.net/inkscape/+bug/171140 I am writing an extension for hyphenating the text when it is justified. I have the first version ready to use for both English and Malayalam(ml_IN) and tested in Inkscape 0.46 in Debian Sid. It is available for testing here: http://thottingal.in/projects/inkscape/inkscape-hyphenation.zip
Thank you very much! I think we really need this, and if we can get it in before 0.47 we must do it. I have tested it on Windows XP and got it working somehow, but here are the issues I found:
1. In
def loadAllDicts(self, directory): for dirname, dirnames, filenames in os.walk('.'):
must really be
def loadAllDicts(self, directory): for dirname, dirnames, filenames in os.walk(directory):
because otherwise it walks a different directory that happened to be current (on Windows).
2. This failed for me:
self.hd += Hyph_dict(filename_full)
complaining that += is not supported for dictionaries. Maybe a different python version is the reason; we ship with 2.5.2 on Windows.
3. Finally and most importantly, while it did add correct hyphen points to the text, Inkscape didn't treat them correctly: it just broke words at those points but didn't insert visible hyphens as it should (in English text). I know that some languages need to insert hyphens and some don't. What is the proper way to fix this? Should Inkscape determine this based on xml:lang?
I also cc: our text expert, Richard Hughes. Richard, what would it take to implement adding visible hyphens on breaks in flowed text?