Bug 103401

Summary: FORMATTING: Ext-B Characters overdrawn or adding extra spaces with justified alignment.
Product: LibreOffice Reporter: Mark Hung <marklh9>
Component: graphics stackAssignee: ⁨خالد حسني⁩ <khaled>
Status: RESOLVED FIXED    
Severity: normal CC: khaled, vsfoote
Priority: medium    
Version: 5.3.0.0.alpha0+   
Hardware: All   
OS: Linux (All)   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=96457
Whiteboard: target:5.3.0
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 89870    
Attachments: Sample file.
Side by side comparison
Comparison showing no difference

Description Mark Hung 2016-10-22 04:35:29 UTC
Created attachment 128144 [details]
Sample file.

Formatting regression seen after setting SAL_USE_COMMON_LAYOUT for 5.3.0.0 alpha0. The attach file contains CJK ideograph characters in ext-b, and set alignment to 'justified'. Some characters are overdrawn or extra space inserted between chracters. Note that I didn't install MS PMingLiuB.ttf so it was shown as empty boxes.
Comment 1 Mark Hung 2016-10-22 04:39:22 UTC
Created attachment 128145 [details]
Side by side comparison
Comment 2 Mark Hung 2016-10-22 04:41:33 UTC
It's only seen on Linux. I didn't see this issue in Windows10 and Windows7.
Comment 3 ⁨خالد حسني⁩ 2016-10-22 05:06:39 UTC
Created attachment 128146 [details]
Comparison showing no difference

I see no difference with or without SAL_USE_COMMON_LAYOUT=1.
Comment 4 Mark Hung 2016-10-22 15:53:26 UTC
Khaled,

Have you installed MS PMingLiu in your system?

For some reason I can't open font application from Linux. But I don't remember that I have installed one, so might it be affected by font fallback?
Comment 5 ⁨خالد حسني⁩ 2016-10-22 17:30:54 UTC
(In reply to Mark Hung from comment #4)
> Khaled,
> 
> Have you installed MS PMingLiu in your system?
> 
> For some reason I can't open font application from Linux. But I don't
> remember that I have installed one, so might it be affected by font fallback?

No, I don’t have MS PMingLiu installed.
Comment 6 Volga 2016-10-23 18:59:40 UTC
(In reply to Khaled Hosny from comment #5)
> (In reply to Mark Hung from comment #4)
> > Khaled,
> > 
> > Have you installed MS PMingLiu in your system?
> > 
> > For some reason I can't open font application from Linux. But I don't
> > remember that I have installed one, so might it be affected by font fallback?
> 
> No, I don’t have MS PMingLiu installed.


Don’t worry, you can try to get any font which support CJK ext-B block from the following resource if you want to test:
https://en.wikipedia.org/wiki/List_of_CJK_fonts
Comment 7 ⁨خالد حسني⁩ 2016-10-23 21:00:48 UTC
I installed Hanazono fonts, and all the characters are shown correctly now. Still no spacing issue.

Hmm, I can reproduce the spacing issue only if I manually set the font to HanaMinB.
Comment 8 Commit Notification 2016-10-29 22:41:27 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7b4d921d8e4164a962cd10a2efc9c62ecf64ff17

tdf#103401: Fix applying DX array with font fallback

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.