| Summary: | Arabic text with No-Width optional break (U+200B) does not apply OpenType font feature properly | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | Lateef Shaikh <lateef_sagar> |
| Component: | Writer | Assignee: | Not Assigned <libreoffice-bugs> |
| Status: | NEW --- | ||
| Severity: | normal | CC: | khaled, lateef_sagar, stephane.guillou |
| Priority: | medium | ||
| Version: | Inherited From OOo | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Crash report or crash signature: | Regression By: | ||
| Bug Depends on: | |||
| Bug Blocks: | 102345 | ||
| Attachments: |
Image showing bug
Character dialog box sample ODT U2060 |
||
|
Description
Lateef Shaikh
2023-10-02 13:51:58 UTC
Created attachment 189957 [details]
Image showing bug
Created attachment 189958 [details]
Character dialog box
Character dialog box shows the marks positioned properly.
Created attachment 190241 [details]
sample ODT
Thank you for the report, Lateef.
I tried creating a sample document.
If it doesn't match your description, could you please upload a new one and make mine obsolete?
Khaled, I thought you might find this interesting. Note I have used the following font features to match Lateef's: Calibri:calt&dlig&liga (Not that it changed anything to the display.) Tested in: Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: e9374f74385d7dfe77d1902d3d82af20143bc775 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded This is because U+200B is one of the formatting characters that Writer makes visible when View -> Field Shadings is checked, as the way this is implemented breaks text layout around such characters. It works in the font preview because it is rendered using a different code path than Writer’s. But using U+200B here is a font-specific hack, the proper, Unicode-sanctioned way is to add a tatweel before the small alef, which should work with most fonts: ٱلرَّحۡمَـٰن Thank you for your time and help with this. Actually I am trying different characters as alternate to the tatweel approach, because tatweel is more of a justification character and can only be used when we have this scenario between two connecting alphabets. When it comes to non connecting alphabets like Ra and alef then we can't use tatweel. Therefore I was looking for a space like character with zero width and allows joining. U+200B breaks the word so after posting this bug I had a discussion with a friend who made me realize that it is not a good choice anyways. Then I first found U+FEFF (ZWNBSP) but that is deprecated, the new character is Word Joiner (U+2060). It works fine in Chrome and in Libre (using Noto Naskh font). So I think you can close this ticket. Created attachment 190270 [details]
U2060
(In reply to Lateef Shaikh from comment #6) > Thank you for your time and help with this. Actually I am trying different > characters as alternate to the tatweel approach, because tatweel is more of > a justification character and can only be used when we have this scenario > between two connecting alphabets. When it comes to non connecting alphabets > like Ra and alef then we can't use tatweel. Therefore I was looking for a > space like character with zero width and allows joining. FWIW, Unicode suggests using tatweel between connected letters, and NBSP between unconnected ones. I can’t find where this is documented right now so you have to take my word for it. This has the advantage of being a simple solution and works virtually with any font (and if it does not work properly, the fallback will still be acceptable). The behavior reported here is still a bug regardless. |