Bug 107383 - Characters overlap when not supported by fallback font (CJK)
Summary: Characters overlap when not supported by fallback font (CJK)
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.3.2.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: CJK
  Show dependency treegraph
 
Reported: 2017-04-24 12:30 UTC by Hiunn-hué
Modified: 2019-06-27 02:56 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
screenshot (52.79 KB, image/png)
2017-04-24 12:32 UTC, Hiunn-hué
Details
demo_pdf (24.48 KB, application/pdf)
2017-04-24 12:33 UTC, Hiunn-hué
Details
demo_odt (13.18 KB, application/vnd.oasis.opendocument.text)
2017-04-24 12:33 UTC, Hiunn-hué
Details
Screenshot on Windows (75.04 KB, image/png)
2017-10-09 08:12 UTC, Volga
Details
demo_odt2 (9.89 KB, application/vnd.oasis.opendocument.text)
2017-10-11 07:15 UTC, Volga
Details
Screenshot on Windows (2) (102.76 KB, image/png)
2017-10-11 07:28 UTC, Volga
Details
reproduce_comment4 (16.65 KB, application/vnd.oasis.opendocument.text)
2017-10-11 08:41 UTC, Hiunn-hué
Details
reproduce_comment4_result (70.25 KB, application/pdf)
2017-10-11 08:42 UTC, Hiunn-hué
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hiunn-hué 2017-04-24 12:30:41 UTC
Description:
It seems like that LibreOffice picks fallback font based on the first character. When the chosen fallback font dose not support the following characters, they'll overlap each other.


Steps to Reproduce:
 1. Uninstall all Chinese fonts and keep Japanese or Korean fonts as the fallback fonts.

 2. Open Writer, input some common Han characters, for example "天地人" (sky, earth, human), which should be supported by most Japanese fonts or some Korean fonts.

 3. Insert an unsupported character between 天 and 地, for example Bopomofo "ㄅ".

 4. Apply any font which does not support Han characters (Arial or Liberation Sans for example), so the fallback font will be used instead.

 5. In my case, the fallback font is NanumGothic, which supports "天地人" but not "ㄅ".

Actual Results:  
Please see attached PDF or PNG.

Expected Results:
Characters should not overlap.


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/57.0.2987.98 Chrome/57.0.2987.98 Safari/537.36
Comment 1 Hiunn-hué 2017-04-24 12:32:20 UTC
Created attachment 132778 [details]
screenshot
Comment 2 Hiunn-hué 2017-04-24 12:33:21 UTC
Created attachment 132779 [details]
demo_pdf
Comment 3 Hiunn-hué 2017-04-24 12:33:44 UTC
Created attachment 132780 [details]
demo_odt
Comment 4 Hiunn-hué 2017-04-29 16:11:28 UTC
Another way to reproduce:

 1. Make sure that your system does NOT display Korean characters (Hangeul).

 2. Input or paste some common Chinese/Japanese characters.

 3. Insert a Korean character in the middle.

 4. Apply non-cjk fonts to all characters, such as Arial or Liberation Sans.

 5. The bug appears.


PS: Tangut characters also trigger this bug, when the system has no Tangut fonts installed. But only on 5.3.2.2, not on 5.4.0.0.alpha0+.
Comment 5 Volga 2017-06-14 10:59:37 UTC
It seems to me our font loader does not well performanced for fallback fonts, especially for CJK fonts.
Comment 6 Volga 2017-10-09 08:12:11 UTC
Created attachment 136860 [details]
Screenshot on Windows

This problem does not affect Windows. Version 5.4.2.

版本:5.4.2.2 (x64)
Build ID:22b09f6418e8c2d508a9eaf86b2399209b0990f4
CPU 线程:4; 操作系统:Windows 6.19; UI 渲染:默认; 
区域语言:zh-CN (zh_CN); Calc: group
Comment 7 Xisco Faulí 2017-10-10 09:09:48 UTC
> PS: Tangut characters also trigger this bug, when the system has no Tangut
> fonts installed. But only on 5.3.2.2, not on 5.4.0.0.alpha0+.

Could you please try to reproduce it with version 5.4.2 of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version.
Comment 8 Volga 2017-10-11 07:15:47 UTC
Created attachment 136901 [details]
demo_odt2

Here is my test file for Tangut. You can try to download and install Tangut Yinchuan font for test.
Comment 9 Volga 2017-10-11 07:28:15 UTC
Created attachment 136902 [details]
Screenshot on Windows (2)

My test result for above attachment.

版本:5.4.2.2 (x64)
Build ID:22b09f6418e8c2d508a9eaf86b2399209b0990f4
CPU 线程:4; 操作系统:Windows 6.19; UI 渲染:默认; 
区域语言:zh-CN (zh_CN); Calc: group
Comment 10 Hiunn-hué 2017-10-11 08:41:45 UTC
Created attachment 136905 [details]
reproduce_comment4
Comment 11 Hiunn-hué 2017-10-11 08:42:40 UTC
Created attachment 136906 [details]
reproduce_comment4_result
Comment 12 Hiunn-hué 2017-10-11 08:45:47 UTC
Hi,

sorry, it has been a while since I reported this issue, and the steps in description requires uninstalling all chinese fonts, which is inconvenient for me, so I take the steps in comment 4 to reproduce.

I've tested on both windows 10 and elementary os 0.4 (based on Ubuntu 16.04.3 LTS), and the problem is still there.

Please see the attached odt and pdf.


The odt file is created with LibreOffice 5.4.0.3 on Win 10.  And then I opened it with 6.0.0.0.alpha0+ on Win 10, and 5.4.2.2 and 6.0.0.0.alpha0+ on elementary OS.  The results are all the same (see pdf).

Note: For unknown reason, opening this odt file makes LibreOffice for Linux to slow down or even crash.


=-=-=-=-=-=


As for the Tangut characters, they are in the same situation.

Maybe I didn't make myself clear enough ...

When testing, we have to remove all Tangut fonts, and make sure our system can *NOT* display Tangut characters, rather than installing Tangut fonts.

Since there's no font that supports Tangut characters, they should be displayed as Tofus (a question mark or a cross in a box, or simply a box), one by one, not overlapping with each other.

You can try the attached odt file (reproduce_hangeul), follow the steps, just replace the Korean character with Tangut. The result should be the same.



By the way, when testing with Tangut, I found a issue that might be related, but I don't know if I should open a new bug report for it...


Steps to reproduce:

 1. Make sure your system does NOT display Tangut characters.

 2. Open a new odt file, and past some Tangut characters. So you see Tofus.

 3. Input a latin alphabet, "a" for example, in the beginning of the line.

 4. "a" stays, and Tofus disappear.

 5. expected: both "a" and Tangut characters are displayed, and looks like
> a□□□□□□□□□□□
Comment 13 Xisco Faulí 2018-11-27 13:24:56 UTC
Hi Hiunn-hué,
Reading your last comment 12, it seems you need to remove old chinese and Tangur fonts in order to reproduce this issue.
Is it really a real user case?
Setting to NEEDINFO meanwhile...
Comment 14 QA Administrators 2019-05-27 02:47:04 UTC Comment hidden (obsolete)
Comment 15 QA Administrators 2019-06-27 02:56:25 UTC
Dear Hiunn-hué,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp