Bug 64525 - FORMATTING: Word spacing problem in LibreOffice 4.0.3.3 Ubuntu 13.04
Summary: FORMATTING: Word spacing problem in LibreOffice 4.0.3.3 Ubuntu 13.04
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.3.3 release
Hardware: Other Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
: 64526 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-05-13 09:32 UTC by FaisalHaq
Modified: 2014-04-01 14:57 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
I've attached a document, the font is SutonnyMJ. (9.50 KB, application/msword)
2013-05-13 09:32 UTC, FaisalHaq
Details
SutonnyOMJ font for testing purpose (714.14 KB, application/x-font-ttf)
2013-11-07 00:30 UTC, mmasroorali
Details
Warning shown by fontforge (83.07 KB, image/png)
2013-11-07 08:57 UTC, Pravin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description FaisalHaq 2013-05-13 09:32:00 UTC
Created attachment 79234 [details]
I've attached a document, the font is SutonnyMJ.

Problem description: Word spacing problem

Steps to reproduce:
If I continue to type Bangla 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 perfect.

Another problem is if I open this document in windows with MS Office 2003 the words all appear as square.

I've attached a document, just go through the words and you will notice the problem.
Operating System: Ubuntu
Version: 4.0.3.3 release
Comment 1 Joel Madero 2013-05-19 16:40:45 UTC
*** Bug 64526 has been marked as a duplicate of this bug. ***
Comment 2 Joel Madero 2013-05-19 16:43:05 UTC
The MSO issue would be probably a missing font in Windows, so not our bug (the squares), you'll have to install the appropriate fonts in Windows

I will look at other issue to try to reproduce
Comment 3 FaisalHaq 2013-05-19 17:37:12 UTC
Bug1:
The attached file is actually from MSO, so the font is already present in windows and I need to edit in LO. But what ever I edit all appear in squares in MSO. But the PDF version in windows works just fine for printings.

Bug2:
When I edit, the spacing between words are not correct. As you can see in the attached file, there is just one space, but looking as though there are many spaces.
Comment 4 mmasroorali 2013-08-02 07:56:44 UTC
I confirm the bug. The same problems are happening in my machine.
Comment 5 Joel Madero 2013-08-06 20:12:42 UTC
Not sure if this is our bug or not - does it work correctly in other software within Linux (if so, which ones? Try gedit or your basic text editor of choice)

Requesting additional input
Comment 6 FaisalHaq 2013-08-07 13:23:12 UTC
In gedit it works fine. No problem what so ever. Just copy the writings and paste it in gedit, you will not see any spacing problem. I'm sure it's LO bug.

If you need any other input let me know.
Comment 7 Robinson Tryon (qubit) 2013-10-23 16:50:47 UTC
Removing comma from whiteboard (please use a space to delimit values in this field)
https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Whiteboard#Getting_Started
Comment 8 mmasroorali 2013-10-31 02:31:06 UTC
This is definitely a LibreOffice bug. The inter word spacing problem happens in LibreOffice 4. When the same text (odt) file is opened in LibreOffice 3, the problem disappears.
Comment 9 ⁨خالد حسني⁩ 2013-11-06 10:42:26 UTC
The SutonnyMJ is a broken font, it maps Bengali characters to Latin character code points instead of using correct Bengali Unicode code points. The attached document uses correct Bengali Unicode so selecting this font has no effect and a fallback font will be used. No idea how MS Office showed the text coorectly in the first place, but we do not support such broken fonts, so please use a proper Unicode font and reopen this bug if the issues persists.
Comment 10 mmasroorali 2013-11-06 10:57:36 UTC
Please state your position regarding SolaimanLipi font. Please see this discussion here. http://ask.libreoffice.org/en/question/24884/incorrect-ctl-font-rendering-by-libreoffice-4/


How come this document is fine under LibreOffice 3? And how come it works fine in OpenOffice?
Comment 11 ⁨خالد حسني⁩ 2013-11-06 11:17:26 UTC
(In reply to comment #10)
> Please state your position regarding SolaimanLipi font.

This is a Unicode font and it seems to work fine (except for bug 70968).

> Please see this discussion here.
> http://ask.libreoffice.org/en/question/24884/incorrect-ctl-font-rendering-by-
> libreoffice-4/

This discussion covers several issues, please file a separate bug for each one.

> How come this document is fine under LibreOffice 3? And how come it works
> fine in OpenOffice?

No idea, I have no access to either of them, but I’d guess it just happens that a different font fallback is used, as I can’t see any way this font can be used for Unicode Bengali text; it just does not support it.
Comment 12 FaisalHaq 2013-11-06 20:32:00 UTC
There is no problem with SolaimanLipi. SutonnyMJ issue is not solved.
Comment 13 ⁨خالد حسني⁩ 2013-11-06 20:35:29 UTC
Please reopen only if you can reproduce this issue with Unicode-complaint fonts (if SutonnyMJ is such a font, please let me know where to get it, because all the versions I found are not).
Comment 14 FaisalHaq 2013-11-06 20:58:22 UTC
(In reply to comment #13)
> Please reopen only if you can reproduce this issue with Unicode-complaint
> fonts (if SutonnyMJ is such a font, please let me know where to get it,
> because all the versions I found are not).

SutonnyMJ is not an Unicode font, but most of the works of Bengali Language are done in SutonnyMJ. So we need support for SutonnyMJ. 

SolaimanLipi is just a temporary solution, once the issue gets solved for SutonnyMJ, most of the people will start using SutonnyMJ. This is a great draw back for LO.
Comment 15 Joel Madero 2013-11-06 21:01:14 UTC
NOTOURBUG still. Khaled. We support Unicode and just because some font developers choose to ignore international standards . . . really not our problem.

Please stop opening this bug, instead ping the developer of the font and tell them to comply with international standards
Comment 16 ⁨خالد حسني⁩ 2013-11-06 21:24:17 UTC
To be fair to the font developer, the font seems to have been produced in 1998, so I wouldn’t fault him for not using Unicode and OpenType back then. But this is no excuse for people to keep using it after the advance of Unicode and font formats. If this particular font is a must, I think concentrating the efforts to updating it to Unicode and OpenType is the only way forward.
Comment 17 Joel Madero 2013-11-06 21:28:27 UTC
Thanks Khaled for that - agreed with your proposition and that's still NOTOURBUG.
Perhaps FaisalHaq - you can update the font to unicode and thus in compliance with internationally agreed upon standards
Comment 18 mmasroorali 2013-11-07 00:27:59 UTC
Good to see that we are again taking the issue seriously. 

While SutonnyMJ is not a Unicode font, SutonnyOMJ is (Did you notice the extra O? I already mentioned this font in this question http://ask.libreoffice.org/en/question/24884/incorrect-ctl-font-rendering-by-libreoffice-4/). This is one of the fonts selected as part of the standardization process by the Government of Bangladesh. I am attaching here that font for testing.

This font is actually not freely distributable, so I assume that this will be used for testing purposes only. Though you will find sites which freely distribute this font, including this one, http://bcps.org.bd/font/SutonnyBanglaOMJ.ttf.

About comment #14, perhaps the commenter will try to understand that SutonnyMJ (non Unicode) has not been recently gazetted as one of the standard fonts to be used in all government documents. SutonnyOMJ is among the selected ones along with  Nikosh, SolaimanLipi, Vrinda, and Mukti.
It will be a good idea to see whether LibreOffice 4 works fine with all these once release 4.1.4 comes out. LibreOffice 3 (and OpenOffice) work fine with all of these.

Personally, I will remain happy if LibreOffice 4 works with SolaimanLipi. That one is my favorite.
Comment 19 mmasroorali 2013-11-07 00:30:48 UTC
Created attachment 88795 [details]
SutonnyOMJ font for testing purpose
Comment 20 Robinson Tryon (qubit) 2013-11-07 00:46:56 UTC
(In reply to comment #18)
> 
> While SutonnyMJ is not a Unicode font, SutonnyOMJ is (Did you notice the
> extra O? I already mentioned this font in this question
> http://ask.libreoffice.org/en/question/24884/incorrect-ctl-font-rendering-by-
> libreoffice-4/). This is one of the fonts selected as part of the
> standardization process by the Government of Bangladesh. I am attaching here
> that font for testing.

Hi,
Thanks for attaching the font for repro purposes, but...

> This font is actually not freely distributable, so I assume that this will
> be used for testing purposes only. Though you will find sites which freely
> distribute this font, including this one,
> http://bcps.org.bd/font/SutonnyBanglaOMJ.ttf.

...if there are licensing issues surrounding this font, I suggest that it not be made an attachment on FDO. We can either point to an external site such as the one you listed, or we can store the font internally (assuming we have permission to use the font internally at LibreOffice).

I'm confused as to how this non-distributable fonts made it into a government standard. I don't know the background of this particular standard, but is there a possibility that we could suggest that the non-distributable fonts be replaced with freely-distributable, unicode-compliant alternatives?

For an example, see https://en.wikipedia.org/wiki/Liberation_fonts

> About comment #14, perhaps the commenter will try to understand that
> SutonnyMJ (non Unicode) has not been recently gazetted as one of the
> standard fonts to be used in all government documents. SutonnyOMJ is among
> the selected ones along with  Nikosh, SolaimanLipi, Vrinda, and Mukti.
> It will be a good idea to see whether LibreOffice 4 works fine with all
> these once release 4.1.4 comes out. LibreOffice 3 (and OpenOffice) work fine
> with all of these.

What's the licensing situation of these additional fonts?
Comment 21 mmasroorali 2013-11-07 01:01:22 UTC
I do not want to make any comment on the font selection for standardization, I am not sure whether any body used ones influence. But may be they wanted to mix both the free and non-free ones. 

Answering your query, Vrinda comes from Microsoft and not freely distributable. You already know the position of SutonnyOMJ. The rest three (Nikosh, SolaimanLipi, and Mukti) are freely distributable.
Comment 22 ⁨خالد حسني⁩ 2013-11-07 08:27:42 UTC
(In reply to comment #18)
> Good to see that we are again taking the issue seriously. 
> 
> While SutonnyMJ is not a Unicode font, SutonnyOMJ is (Did you notice the
> extra O? I already mentioned this font in this question
> http://ask.libreoffice.org/en/question/24884/incorrect-ctl-font-rendering-by-
> libreoffice-4/). This is one of the fonts selected as part of the
> standardization process by the Government of Bangladesh. I am attaching here
> that font for testing.

This is the cropped text issue (which you should have opened a separate issue for, but anyway). Again the font is broken, this time the font sets a positive value for OS/2 sTypoDescender (http://www.microsoft.com/typography/otspec/os2.htm#std) and hhea Descender (http://www.microsoft.com/typography/otspec/hhea.htm), but those values should be *negative* for descenders below baseline.

This works with older version of LibreOffice and OpenOffice because the ascender was taken from OS/2 usWinDescent (http://www.microsoft.com/typography/otspec/os2.htm#wd) which is *positive* for descenders below baseline, but using usWin* value to calculate line height was wrong and broke other fonts, so we changed that. So the solution here is to fix the font.

I think the font developers might get away with this because other software are either using usWinDescent or forcing sTypoDescender et al. to be negative to work around such font bugs. But I personally don’t like such hacks, if the font is broken then it should be fixed instead of hacking every software package to work around its brokenness (and what if a font has legitimate use of positive descender, why break a completely valid font?).

And if this font is not free, I think bugzilla admins should remove it, any body knows how to contact them?
Comment 23 Pravin 2013-11-07 08:57:24 UTC
Created attachment 88812 [details]
Warning shown by fontforge

Me too tested attached font https://bugs.freedesktop.org/attachment.cgi?id=88795 and it is badly broken. 

Test environment:
1. fedora-release-19-4.noarch
2. libreoffice-writer-4.1.2.3-3.fc19.x86_64
3. gnome-shell-3.8.4-2.fc19.x86_64

Problem:
1. after installing libreoffice does not recognize this font.
2. copying text from attached document to gedit show only square box.

For understanding issues while opening with fontforge it notified number of problems. 

Khaled has provided exact issues that needs fix.
 
Kindly report bugs against font developer and ask him to refer other standard fonts for values and update this.
Comment 24 Joel Madero 2013-11-07 13:57:59 UTC
Contacting Tollef to take care of it - I really think this needs to be closed and if it's reopened then the user(s) are in violation of FDO policy - we have 2 QA people and an experienced developer saying THIS IS NOT OUR BUG - by reopening it 5 times without addressing the main issue (that it's not our bug) you've violated our policies - we've been very patient but you haven't explained why we should add code (and waste developers time) to address a broken font
Comment 25 retired 2014-03-30 09:30:10 UTC
NOTOURBUG as of comment 23 and comment 24. thanks for understanding.
Comment 26 FaisalHaq 2014-03-30 13:52:41 UTC
LibreOffice works fine with Unicode fonts, but SutonnyMJ is a ANSI font. That's why we may not get any solution from them. 

So if you are seeking a solution for a ANSI font then you are at the dead end. Because they are keep on saying that this is not their bug. If LO doesn't support ANSI fonts then truly this is not their bug. But if they say they support any font then surely this is their bug. 

What LO is failing to understand is that, we (Bangla Writers) have learned typing using MS Office and using this font, even though the font testing is not giving the correct result. We faced no problem in MS Office what so ever. Still now there is no problem regarding this font in MS Office.
Comment 27 Joel Madero 2014-04-01 14:57:10 UTC
That's fine - Microsoft appears to have worked in some workaround to deal with a single non compliant font but that doesn't change the fact that it is not our bug. I'm sorry that you got used to a font that doesn't comply with standards but - I encourage you to look for alternatives as I'm positive there are some out there that work just fine. 

I haven't tested this one but: http://linuxunderthesky.blogspot.com/2012/03/bengali-input-in-windowslinux.html

We can't continue to add lines of code to deal with non compliant fonts (and other pet projects that people prefer but that do not comply with standards).