Bug 159779 - With Cascadia Code typeface, Ligatures intermingle with Arabic text
Summary: With Cascadia Code typeface, Ligatures intermingle with Arabic text
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Font-Rendering RTL
  Show dependency treegraph
 
Reported: 2024-02-19 22:18 UTC by AvidSeeker
Modified: 2024-09-15 01:03 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Cascadia font intermingling on Libreoffice (8.84 KB, image/png)
2024-03-09 21:34 UTC, AvidSeeker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description AvidSeeker 2024-02-19 22:18:20 UTC
Description:
Characters overlap over each other

Steps to Reproduce:
1. Font: Cascadia Mono (https://github.com/microsoft/cascadia-code)
2. Text:

العربية.. <<تجربة>>

Actual Results:
https://i.imgur.com/yVLxuLM.png

Expected Results:
.


Reproducible: Always


User Profile Reset: No

Additional Info:
.
Comment 1 Dieter 2024-03-08 10:39:41 UTC
Does it only happen with Cascadia Mono or with several fonts?
Comment 2 wjsim 2024-03-08 20:40:21 UTC
Thank you for reporting the bug. I wasn't able to use the font in versions:

Version: 24.2.1.2 (X86_64) / LibreOffice Community
Build ID: db4def46b0453cc22e2d0305797cf981b68ef5ac
CPU threads: 16; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 6a064b1967e06e40be40817deff99d00c1a8554f
CPU threads: 16; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

I'm not sure if that is just on my end, but I've reinstalled both versions of LibreOffice for the sake of testing but to no avail.
Comment 3 Buovjaga 2024-03-09 07:23:43 UTC
The imgur link is broken. Please attach the image to the report, so it is not lost.

I tested it, but I am not seeing any issue comparing to how Firefox renders the text here.

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e939685f9c6918830bd3097062790bfccbce937e
CPU threads: 2; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

Version: 7.5.6.0.0+ (X86_64) / LibreOffice Community
Build ID: f0e825382a76d685998be702ed551a00b73476a5
CPU threads: 2; OS: Windows 10.0 Build 22621; UI render: default; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 4 AvidSeeker 2024-03-09 21:34:04 UTC
Created attachment 193042 [details]
Cascadia font intermingling on Libreoffice
Comment 5 AvidSeeker 2024-03-09 21:35:10 UTC
>Does it happen with other fonts?

Cascadia Code is special in that it's the only font (I know of) that has support for both Arabic and code ligatures.

I opened an issue for Cascadia in case they knew the cause of this: https://github.com/microsoft/cascadia-code/issues/714
Comment 6 QA Administrators 2024-03-10 03:15:32 UTC Comment hidden (obsolete)
Comment 7 Buovjaga 2024-03-10 06:34:21 UTC
(In reply to AvidSeeker from comment #5)
> >Does it happen with other fonts?
> 
> Cascadia Code is special in that it's the only font (I know of) that has
> support for both Arabic and code ligatures.
> 
> I opened an issue for Cascadia in case they knew the cause of this:
> https://github.com/microsoft/cascadia-code/issues/714

Ok, so you are seeing this on Linux.

In the GitHub report you mention: "Cascadia Code (the version with ligatures)"

Can you say which exact font file this is?

I now tried both CascadiaMono.ttf and CascadiaMonoPL.ttf on Arch Linux, but I don't see any problem with 24.2 or 7.5. My FreeType version is the same as yours, 2.13.2.

Maybe best would be to attach an example file, so there is no ambiguity.
Comment 8 AvidSeeker 2024-03-10 22:54:19 UTC
Sorry. It's Cascadia Code. Cascadia Mono is the one without ligatures.

/usr/share/fonts/TTF/CascadiaCode.ttf
/usr/share/fonts/TTF/CascadiaCodePL.ttf
Comment 9 Buovjaga 2024-03-11 08:49:39 UTC
Confirmed with Cascadia Code. Already seen in 4.3

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e939685f9c6918830bd3097062790bfccbce937e
CPU threads: 2; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 10 Eyal Rozenberg 2024-08-04 21:16:17 UTC Comment hidden (obsolete)
Comment 11 Eyal Rozenberg 2024-08-19 13:22:06 UTC
(In reply to Eyal Rozenberg from comment #10)

Anti-confirmed... I now fail to reproduce this :-(

Can someone please attach a reproducer document with the fonts set? Or provide exact reproduction instructions, including in particular which language group to set the font for?
Comment 12 Buovjaga 2024-08-19 17:25:10 UTC
(In reply to Eyal Rozenberg from comment #11)
> (In reply to Eyal Rozenberg from comment #10)
> 
> Anti-confirmed... I now fail to reproduce this :-(
> 
> Can someone please attach a reproducer document with the fonts set? Or
> provide exact reproduction instructions, including in particular which
> language group to set the font for?

Hmm, now I only see the rightmost > overlapping the paragraph mark.

1. Get Cascadia Code from https://github.com/microsoft/cascadia-code/releases
2. Install CascadiaCode.ttf
3. Paste as unformatted text: العربية.. <<تجربة>>

AvidSeeker: what do you think of the current result?

Version: 24.2.5.2 (X86_64) / LibreOffice Community
Build ID: 420(Build:2)
CPU threads: 8; OS: Linux 6.10; UI render: default; VCL: kf6 (cairo+wayland)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
24.2.5-2
Calc: threaded
Comment 13 Eyal Rozenberg 2024-08-19 20:51:30 UTC
(In reply to Buovjaga from comment #12)
So, that's not sufficient.

1. Get Cascadia Code from https://github.com/microsoft/cascadia-code/releases
2. Install CascadiaCode.ttf
3. Create a new document in any LO module
4. Paste as unformatted text: العربية.. <<تجربة>>
5. Choose the text you pasted, and set its font to "Cascadia Code"

Also, the first comment of this bug is confusing in that I _don't_ see this bug with "Cascadia Mono" but _do_ see it with "Cascadia Code".
Comment 14 AvidSeeker 2024-08-20 01:46:55 UTC
Make sure to set paragraph direction (or text alignment) to RTL.
Comment 15 Buovjaga 2024-08-20 05:49:29 UTC
Ok, reliable steps:

1. Get Cascadia Code from https://github.com/microsoft/cascadia-code/releases
2. Install CascadiaCode.ttf
3. Open Writer
4. Set text direction to RTL
5. Paste as unformatted text: العربية.. <<تجربة>>
6. Choose the text you pasted, and set its font to "Cascadia Code"

Still repro with

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 1565181908a06dcdb8d97d6be8ff773acd1d05cb
CPU threads: 8; OS: Linux 6.10; UI render: default; VCL: kf6 (cairo+wayland)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: CL threaded
Comment 16 ⁨خالد حسني⁩ 2024-09-15 01:03:03 UTC
(In reply to AvidSeeker from comment #5)
> >Does it happen with other fonts?
> 
> Cascadia Code is special in that it's the only font (I know of) that has
> support for both Arabic and code ligatures.
> 
> I opened an issue for Cascadia in case they knew the cause of this:
> https://github.com/microsoft/cascadia-code/issues/714

It is a font bug ad confirmed by upstream in the above-mentioned issue.