Bug 136121 - Digits (1234 etc.) not rendered when font set as Noto Kufi Arabic - English characters rendered using fallback font, but digits are not (Regression from 6.0.7, example file in comment 10)
Summary: Digits (1234 etc.) not rendered when font set as Noto Kufi Arabic - English c...
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.5.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Font-Rendering
  Show dependency treegraph
 
Reported: 2020-08-25 19:07 UTC by Taher Alkhateeb
Modified: 2020-11-22 07:20 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
numbers render correctly with a fallback font (88.08 KB, image/png)
2020-08-26 07:04 UTC, Taher Alkhateeb
Details
listing of installed fonts on environment (79.84 KB, text/plain)
2020-08-26 07:13 UTC, Taher Alkhateeb
Details
Bug display during inputting of text but before saving (80.59 KB, image/png)
2020-08-26 09:23 UTC, Taher Alkhateeb
Details
Bug display after inputting text, saving, closing and reopening the file (78.84 KB, image/png)
2020-08-26 09:24 UTC, Taher Alkhateeb
Details
Test document with arabic and english input to showcase the bug (9.77 KB, application/vnd.oasis.opendocument.text)
2020-08-26 09:25 UTC, Taher Alkhateeb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Taher Alkhateeb 2020-08-25 19:07:05 UTC
Description:
In libreoffice 6.4.6.2 writer I cannot see the "digits" of certain fonts. For example you can download and install the noto kufi font [1] and observe that although you can type text, digits would show up as blank white spaces

In earlier versions of libreoffice, this was not a bug, so it is relatively new.

[1] https://noto-website-2.storage.googleapis.com/pkgs/NotoKufiArabic-hinted.zip

Steps to Reproduce:
1. install libreoffice libreoffice 6.4.6.2
2. download noto kufi font and place in /usr/share/fonts <- https://noto-website-2.storage.googleapis.com/pkgs/NotoKufiArabic-hinted.zip
3. run writer, select noto kufi font, and observe how numbers are blank

Actual Results:
typing digits renders white spaces or invisible text

Expected Results:
typing digits renders them normally


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
Version: 6.4.6.2
Build ID: 0ce51a4fd21bff07a5c061082cc82c5ed232f115
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-GB (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 1 Ming Hua 2020-08-25 19:47:14 UTC
The Noto Kufi Arabic font, the one on my Windows system [1] at least, doesn't contain glyphs for digit characters (1234567890).

1. Filename NotoKufiArabic-Regular.ttf, version 1.04, filesize 80,440 bytes.
Comment 2 Taher Alkhateeb 2020-08-25 20:47:39 UTC
Perhaps what you're saying is correct. However older versions of LibreOffice used to show the digits anyway, which means it might fallback to another font or something? Right now what happens is what I described. We can close this ticket if you think this behavior should _not_ be addressed. But I suppose a fallback font or something to that effect might be a better approach?
Comment 3 Ming Hua 2020-08-26 00:56:36 UTC
(In reply to Taher Alkhateeb from comment #2)
> Perhaps what you're saying is correct. However older versions of LibreOffice
> used to show the digits anyway, which means it might fallback to another
> font or something? Right now what happens is what I described. We can close
> this ticket if you think this behavior should _not_ be addressed. But I
> suppose a fallback font or something to that effect might be a better
> approach?
I definitely think the problem should be addressed, but to achieve that we must first find out what the problem is.

If we eliminate the factor of Noto Kufi Arabic font (which you probably agree is irrelevant here), your problem becomes a very vague "I used to see digits in some unspecified old LO version, now in 6.4.6 the digits aren't displayed".  And without more information, few people can help, unless he/she also stumbles into such a problem.  All I was doing was trying to find an environment that can reproduce the problem while eliminating irrelevant factors.

I believe in general LO uses the "Western" font to display the digit characters.  And if one chooses some font without digit glyphs as the Western font, there will be fallback font used.  Your report didn't specify how the font was set up in your system and LO.

It would help if you can install an older version of LO on your system using parallel installation (for Linux, see https://wiki.documentfoundation.org/Installing_in_parallel/Linux), and then confirm the problem is due to difference between LO versions, not some other changes in your system.  Then it is probably also necessary to describe the various fonts installed in your system (I assume most Linux still uses fontconfig?  So output of fc-list, fc-cache, etc.).  If the problem doesn't happen to a fresh install and newly created document, an example file and the information about your LO configuration is also needed.

I don't use Linux anymore, so I don't even fully know which questions to ask.  I'll leave that to others.  Meanwhile, as the bug reporter, the more information you can provide, the easier it is for other people to reproduce your problem and solve it.
Comment 4 Taher Alkhateeb 2020-08-26 07:04:08 UTC
Created attachment 164697 [details]
numbers render correctly with a fallback font
Comment 5 Taher Alkhateeb 2020-08-26 07:13:26 UTC
Created attachment 164700 [details]
listing of installed fonts on environment
Comment 6 Taher Alkhateeb 2020-08-26 07:17:14 UTC
Hello

So I installed libreoffice version 6.0.7.3 (which comes with my distro by default) and when I installed it using apt it installed all required packages [2]. When I did that, the numbers rendered as expected and shown in the screenshot [3]. I have also listed installed fonts on my environment [4] as requested

Now, if I remove the office 6.0.7.3 installation and replace it with the newer 6.4.6.2 which I download directly from libreoffice [5] then the problem that I described returns. This is how I discovered the bug. Is this sufficient as a repeat process? Can I provide any other elaboration?

[1]
Version: 6.0.7.3
Build ID: 1:6.0.7-0ubuntu0.18.04.10
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: x11; 
Locale: en-GB (en_US.UTF-8); Calc: CL

[2] libreoffice libreoffice-avmedia-backend-gstreamer libreoffice-base libreoffice-base-core libreoffice-base-drivers libreoffice-calc libreoffice-common libreoffice-core libreoffice-draw libreoffice-impress libreoffice-math libreoffice-report-builder-bin libreoffice-style-galaxy libreoffice-style-tango libreoffice-writer python3-uno uno-libs3 ure

[3] https://bug-attachments.documentfoundation.org/attachment.cgi?id=164697

[4] https://bugs.documentfoundation.org/attachment.cgi?id=164700&action=edit

[5] https://mirror.freedif.org/TDF/libreoffice/stable/6.4.6/deb/x86_64/LibreOffice_6.4.6_Linux_x86-64_deb.tar.gz
Comment 7 Ming Hua 2020-08-26 08:35:02 UTC
Thanks for testing and the added information.

(In reply to Taher Alkhateeb from comment #0)
> Version: 6.4.6.2
> Build ID: 0ce51a4fd21bff07a5c061082cc82c5ed232f115
> CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3; 
> Locale: en-GB (en_US.UTF-8); UI-Language: en-US
> Calc: threaded
(In reply to Taher Alkhateeb from comment #6)
> Version: 6.0.7.3
> Build ID: 1:6.0.7-0ubuntu0.18.04.10
> CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: x11; 
> Locale: en-GB (en_US.UTF-8); Calc: CL
As these two versions use different VCL, can you test the 6.4.6 version with x11 VCL?  Find the directory the TDF 6.4.6 version is installed (I assume /opt? The "dpkg -l" command should list all installed files if you don't know), then run the following command from that directory:
$ SAL_USE_VCLPLUGIN=gen ./soffice
and see if the problem persists.

Also, from your initial report I assume for the document shown in your screenshot, only the digits in the right column (with the Arabic text) disappeared, while the digits in the left column (with the English text) were displayed correctly?

If there is no sensitive information in your document, would you please add it as an attachment as well?  For some people it's not trivial to input Arabic text, and an example file would help.
Comment 8 Taher Alkhateeb 2020-08-26 09:23:12 UTC
Created attachment 164706 [details]
Bug display during inputting of text but before saving
Comment 9 Taher Alkhateeb 2020-08-26 09:24:33 UTC
Created attachment 164707 [details]
Bug display after inputting text, saving, closing and reopening the file
Comment 10 Taher Alkhateeb 2020-08-26 09:25:56 UTC
Created attachment 164708 [details]
Test document with arabic and english input to showcase the bug
Comment 11 Taher Alkhateeb 2020-08-26 09:28:01 UTC
So this bug is weird. I've done a few tests and note the following:

- There is no difference in behavior whether starting libreoffice from icon launcher or SAL_USE_VCLPLUGIN=gen /opt/libreoffice6.4/program/soffice. The behavior is the same
- If I start a new document and start typing in English with noto kufi arabic font, I can see the text and the digits. [1] HOWEVER if I save the document and open it again, the digits are gone and I cannot see them [2]
- If I start a new document and start typing in Arabic with noto kufi arabic font then I cannot view the digits at all [1]

I have also attached a sample document to test more easily [3]

[1] https://bug-attachments.documentfoundation.org/attachment.cgi?id=164706
[2] https://bug-attachments.documentfoundation.org/attachment.cgi?id=164707
[3] https://bugs.documentfoundation.org/attachment.cgi?id=164708
Comment 12 Ming Hua 2020-08-26 21:47:18 UTC
Thanks.  These are the information I can think of right now.

Unfortunately I can not reproduce your problem on Windows, the example file displays fine for me, both the "1234" in English and Arabic text are displayed.
Version: 6.4.6.2 (x64)
Build ID: 0ce51a4fd21bff07a5c061082cc82c5ed232f115
CPU threads: 2; OS: Windows 10.0 Build 18363; UI render: default; VCL: win; 
Locale: zh-CN (zh_CN); UI-Language: en-US
Calc: threaded
Checking or unchecking "Tools > Options > Language Settings > Languages > Complex text layout" doesn't make a difference.

I'm afraid that's all I can do now.  Let's wait for someone with Linux environment or more expertise to tackle this problem.
Comment 13 Taher Alkhateeb 2020-08-26 22:49:52 UTC
Hello,

Thank you very much for putting the time and energy into this. At least we learned that this bug is OS / Environment specific. We're just not sure what or where exactly.

Do you have any suggestions or pointers on how to debug this? Do I need to compile from source? Are there any debugging tools that come out of the box? Maybe I can capture some error messages or at least figure out whats going on while rendering.
Comment 14 Ming Hua 2020-08-27 08:48:14 UTC
(In reply to Taher Alkhateeb from comment #13)
> Do you have any suggestions or pointers on how to debug this? Do I need to
> compile from source? Are there any debugging tools that come out of the box?
> Maybe I can capture some error messages or at least figure out whats going
> on while rendering.
Sorry I can't give much advice here, as I'm not a developer myself.

As far as I know there is no special debugging tool, the developers just use a debug build and ordinary tools (Visual Studio on Windows, gdb on Linux).  You can refer to the wiki page https://wiki.documentfoundation.org/Development/How_to_debug if you are really interested.

You can also ask on the development mailing list (https://lists.freedesktop.org/mailman/listinfo/libreoffice) or IRC (#libreoffice-dev on Freenode) for pointers and suggestions.  The development and QA pages on wiki also contain a lot of information.
Comment 15 Timur 2020-11-10 11:33:27 UTC
I didn't reproduce in Linux Mint 19, 6.4 nor master, with installed Noto Kufi Arabic ( I don't know how it was installed ). 

This is some local issue. I set to Needinfo for you to find out. 

After you put font in /usr/share/fonts you sudo fc-cache -f -v.
Try also to deinstall font and put per user to ~/.fonts/.

Also you may try 1-file AppImage LO from http://libreoffice.soluzioniopen.com, 5.4 and 6.4 and master 7.1+ .
Comment 16 Taher Alkhateeb 2020-11-21 21:40:02 UTC
Hello,

Thank you for all the support you guys. I'm resolving this ticket as I have moved away from Linux Mint. I had this problem in two different computers and so I thought this might be a problem generally with Linux Mint, but since then I'm on Arch and everything seems to be working fine. If I face this problem in the future I might re-open a ticket to identify a recurring problem, but I think by now this problem might not be worth all the effort. Thank you all again

Cheers,

Taher Alkhateeb
Comment 17 Timur 2020-11-22 07:20:27 UTC
Won't Fix is for confirmed issue, here is not, so I close as NOB.