Bug 107612 - NNBSP rendered incorrectly in Mongolian when font fallback is used
Summary: NNBSP rendered incorrectly in Mongolian when font fallback is used
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.3.2.1 rc
Hardware: All All
: medium normal
Assignee: ⁨خالد حسني⁩
URL:
Whiteboard: target:24.2.0 target:7.6.1
Keywords:
Depends on:
Blocks: Formatting-Mark Font-Substitution China-Minority-Scripts CTL
  Show dependency treegraph
 
Reported: 2017-05-04 03:07 UTC by Volga
Modified: 2024-09-15 00:55 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot (14.27 KB, image/png)
2017-05-04 07:02 UTC, Volga
Details
Screenshot 2 (149.54 KB, image/png)
2020-11-27 16:19 UTC, Volga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Volga 2017-05-04 03:07:54 UTC
Description:
NNBSP (U+202F Narrow No-Break SPace) in Mongolian texts fail to change the form of the letters following them as they should if LibreOffice using fallback font to render the text. The problem disappears when the author or the reader explicitly chooses a Mongolian font.

Steps to Reproduce:
1. Download a test file from https://bug490534.bmoattachments.org/attachment.cgi?id=374937
2. Open with LibreOffice

Actual Results:  
The first line does not specified the font, NNBSP is rendered with default font and surrounding letter failed to jion, the second line is specified using Mongolian Baiti, NNBSP is rendered with Mongolian Baiti and surrounding letter joined with that.

Expected Results:
When NNBSP is surrounded by Mongolian/Manchu letters, this sbace should rendered with the same font used for Mongolian text to make the surrounding letter always works as expected.


Reproducible: Always

User Profile Reset: No

Additional Info:
Version: 5.3.3.1 (x64)
Build ID: 46360c72c4823cefeaa85af537fba22bd568da7e
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; Layout Engine: new; 
Locale: zh-CN (zh_CN); Calc: group


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0
Comment 1 Volga 2017-05-04 07:02:16 UTC
Created attachment 133056 [details]
Screenshot
Comment 2 Yousuf Philips (jay) (retired) 2017-05-04 12:46:10 UTC
@Volga: Fallback fonts arent universally perfect for all languages, i would assume, so i wouldnt blame the issue on the fallback font.

@Khaled: Any ideas what this should be classified under?
Comment 3 Buovjaga 2017-05-07 12:02:56 UTC
I opened the html in LibO and I am not seeing anything at all.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.4.0.0.alpha1+
Build ID: 6e4cba99bb35e6697b94309eedd1a08ebea2dc68
CPU threads: 8; OS: Linux 4.10; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on May 5th 2016
Comment 4 Volga 2017-05-07 17:58:35 UTC
(In reply to Buovjaga from comment #3)
> I opened the html in LibO and I am not seeing anything at all.
> 
> Arch Linux 64-bit, KDE Plasma 5
> Version: 5.4.0.0.alpha1+
> Build ID: 6e4cba99bb35e6697b94309eedd1a08ebea2dc68
> CPU threads: 8; OS: Linux 4.10; UI render: default; VCL: kde4; 
> Locale: fi-FI (fi_FI.UTF-8); Calc: group
> Built on May 5th 2016

Be sure you got Mongolian Baiti, Noto Sans Mongolian and other fonts support Mongolian scripts before you confirmed.
Comment 5 Volga 2017-05-07 18:06:45 UTC
If you don’t use Windows, you can get Mongolian Baiti from here:
http://abkai.net/fonts/monbaiti.ttf
Comment 6 Buovjaga 2017-05-12 13:34:29 UTC
(In reply to Volga from comment #5)
> If you don’t use Windows, you can get Mongolian Baiti from here:
> http://abkai.net/fonts/monbaiti.ttf

I installed the font. Now I see the second line and it is like in your screenshot. First line remains empty.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.4.0.0.alpha1+
Build ID: 8891472e1f9c5e452a4e8d55241eeba118274092
CPU threads: 8; OS: Linux 4.10; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on May 12th 2016
Comment 7 Volga 2017-05-13 04:14:44 UTC
You can also run LibO on the VM to reproduce:
https://dev.windows.com/en-us/microsoft-edge/tools/vms/
Comment 8 Buovjaga 2017-05-13 10:41:09 UTC
Ok, confirmed.

Version: 5.4.0.0.alpha1+ (x64)
Build ID: bbe579a47845e56caf05ae7ab9fdf49319f5647c
CPU threads: 4; OS: Windows 6.19; UI render: default; 
TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2017-04-30_00:10:55
Locale: fi-FI (fi_FI); Calc: group
Comment 9 Volga 2017-05-14 15:50:53 UTC
In this case NNBSP should be treated the same as ZWJ/ZWNJ to make Mongolian letters always presented joining.
Comment 10 QA Administrators 2018-09-25 02:51:30 UTC Comment hidden (noise)
Comment 11 QA Administrators 2020-09-25 03:56:53 UTC Comment hidden (noise)
Comment 12 Kevin Suo 2020-11-23 16:01:46 UTC Comment hidden (obsolete)
Comment 13 Volga 2020-11-27 16:19:57 UTC Comment hidden (obsolete)
Comment 14 Fiable.biz 2023-01-02 08:52:33 UTC Comment hidden (obsolete)
Comment 15 Commit Notification 2023-07-30 07:50:50 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d4653fa961b1aa1cd4bf568e7d1fe50ae97df484

tdf#107612: Include NNBSP and Mongolian characters in the same fallback run

It will be available in 24.2.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 16 Commit Notification 2023-07-31 20:15:37 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/0f67027dbf3774687a558127427ff26796f00328

tdf#107612: Include NNBSP and Mongolian characters in the same fallback run

It will be available in 7.6.1.

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

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