Word spacing problem in LibreOffice Ubuntu 13.04

If I continue to type Bangla or Bengali with iBus>Bengali-Avro Phonetic, no matter what the bangla font is, after a while it will create a problem. The spacing between words are not correct.

Another problem is if I open this document in Windows 7 with MS Office 2003 the words all appear as square. But no problem with PDF version.

I’ve attached a document, just go through the words and you will notice the problem.

Download Attachment

Probably you will need the font also…

Download SutonnyMJ Font

I’ve attached a document for you to check…

I think you should report this misplacement as a bug. Attaching a screenshot which clearly shows where the regular space is too wide would be useful as well.
The problem seems to be that for some reason the width of characters is calculated wrong, sometimes negative, sometimes far too much, you can notice the cursor jumping around when you continuously press right arrow or left arrow.

@mahfiaz before posting here I’ve already filed a bug report, but no response from them https://bugs.freedesktop.org/show_bug.cgi?id=64526 Regarding copying fonts to windows: The original document is actually from windows and the font is already installed there. But problem appears when I try to edit it in LibreOffice. What ever I edit in win7 appears in square and spacing goes wrong. But if I exeport the document in PDF the characters appear fine in windows, but spacing problem still remains.

@oweng SutonnyMJ is a ANSI font (I think) not Unicode, recently found out the only font that works great in LibreOffice (Writing with iBus>Bengali-Avro Phonetic) is AdorshoLipi (Unicode font).But even the popular Unicode font Kalpurush does not work properly in LibreOffice.

Does this mean you solved the problem with the AdorshoLipi font? I updated my answer with further details, but hopefully you have managed to find a workaround.

Please still report this as a bug. Possibly misplacing letters in one language is definitely reason enough to let some developer take a look.

Could you please give us an example how exactly the spacing goes wrong. Example document wouldn’t hurt either.

As for the square characters, you need a good font with Bengali support on Windows. The font you use apparently doesn’t have Bengali characters. The easiest way is to copy the whatever font you are using from Ubuntu (usually in /usr/share/fonts/truetype or ~/.fonts) to C:\Windows\Fonts

The font you are using (SutonnyMJ) is not a valid Unicode font. The Bengali alphabet (abugida) is encoded in the range U+0980-09FF. That particular font has the Bengali characters encoded in the Latin (U+0041-007A) range. Given that the Avro Phonetic keyboard sells itself as being “Full Unicode compliant” (source) I suggest downloading one of the many fonts they provide and see if that still causes problems.

EDIT: Thanks for your feedback. Do you encounter the same problem using iBus>Bengali-Avro Phonetic with other word processing software or only LO? That may help narrow down if it is an LO problem or something related to the keyboard facility being used. If the Unicode fonts they provide do not work, that would tend to indicate that it is an LO problem (IMO). The BiDi characters appear to be getting mis-interpreted.

Another issue might be the DOC format. It shouldn’t be, but it may be worthwhile using an ODT as a test to see if the problem persists. If I save the DOC as and ODT here and then look at the XML, the characters appear fine.

Here is a text file (named with ODT extension) listing the output from the unicode linux command. It seems like a valid stream from my limited understanding. I also cannot see any byte order mark (BOM) in the octal output from the od -c content.xml linux command. Even though the Bangla contains a lot of modifying vowel signs, it should display OK.

I’m quite sure it’s a problem of LO, Since I worked with MS Office in windows and wrote with Avro Phonetics(Windows Version) no problems at all. Even if I paste the sentence here, there is no spacing error “রিসালাতে বিশ্বাস না করলে কোনো বিশ্বাসই পূর্ণতাপ্রাপ্ত হয় না।” কথাটি বুঝিয়ে লেখ। …AdorshoLipi (Unicode font) solves my writing issue in LO, but not solving editing issue of SutonnyMJ DOCs from windows. Normally once my work is done I’d paste it to FB or Wordpress to fix the spacing issue with unicode fonts.

I can confirm that LibreOffice 4 has problem in rendering Bangla text. The inter word spaces are garbled. Sometimes the spaces are too wide, sometimes the spaces are gobbled. When the same document is opened in LibreOffice 3, the problem disappears. I have tested with SolaimanLipi font.