keymanapp / keyboards

Open Source Keyman keyboards
149 stars 267 forks source link

Shan SIL keyboard issues with LibraOffice in Ubuntu 22.04.3 LTS #2420

Closed monghsei closed 7 months ago

monghsei commented 11 months ago

when typing the Shan characters ​ေ​ and ​ႄ there is a kind of "," appears in front of them.

image

source image

@SZTSIIT would know more.

Thanks :)

mcdurdin commented 11 months ago

Thanks for the report. For the video you've attached, could you please tell us (a) the exact key sequence typed, and (b) the expected output?

One more thing: the video shows you using the keyboard in a web browser, not in LibreOffice. Can you give more detail on the difference between the browser experience and the experience in LibreOffice?

monghsei commented 11 months ago

Sorry! forget about the video. The issues with LibraOffice is on the image above.When type "a" and "s" the Shan Characters should show "​ေ“ “​ႄ“ instead they show ",​ေ" and ",​ႄ". But this only happens on LibraOffice. It works fine on MS Word online.

SZTSIIT commented 11 months ago

@monghsei @mcdurdin It is not because of the Shan Sil Keyboard. It is the "LibreOffice "'s issue. Please see the attached image.

image

Sorry Correction: It is the LibreOffice render issues. In MS Word it is working fine.

image
monghsei commented 11 months ago

I see, big thanks !!!!

SZTSIIT commented 11 months ago

@monghsei And it is ok we would never type only ​ေ or ​ႄ anyway. So it should be fine.

image
andjc commented 11 months ago

As indicated those characters will not be typed by themselves or next to each other. But this sequence that should not occur, does indicate a difference between LibreOffice and MS Word.

What you are seeing in LibreOffice is not a glyph from a font, rather its an editing apparatus, A way for LibreOffice to highlight the presence of a non-visual character, in this case ‎U+200B ZERO WIDTH SPACE.

In MS Word, there is no U+200B present.

Looking at the keyboard source, we have the following line of code:

so if you type the a or s key, you get U+200B (the filler) followed by U+1031 or U+1084. The U+200B is removed and U+1031 or U+1084 are reordered when the base character is typed.

So if you type in "as" you should get U+200B U+1031 U+200B U+1084 as displayed in LibreOffice, and not U+1031 U+1084 as displayed in MS Word.

This was tested on macOS, so may also need to be tested on Windows separately. But at first glance there is a difference between what LibreOffice is doing and what MS Word is doing. Additionally LibreOffice seems to be working as expected. MS Word is divergent.

SZTSIIT commented 11 months ago

As indicated those characters will not be typed by themselves or next to each other. But this sequence that should not occur, does indicate a difference between LibreOffice and MS Word. What you are seeing in LibreOffice is not a glyph from a font, rather its an editing apparatus, A way for LibreOffice to highlight the presence of a non-visual character, in this case ‎U+200B ZERO WIDTH SPACE. In MS Word, there is no U+200B present. Looking at the keyboard source, we have the following line of code: + any(prevK) > outs(filler) index(prevU, 1) so if you type the a or s key, you get U+200B (the filler) followed by U+1031 or U+1084. The U+200B is removed and U+1031 or U+1084 are reordered when the base character is typed. So if you type in "as" you should get U+200B U+1031 U+200B U+1084 as displayed in LibreOffice, and not U+1031 U+1084 as displayed in MS Word. This was tested on macOS, so may also need to be tested on Windows separately. But at first glance there is a difference between what LibreOffice is doing and what MS Word is doing. Additionally LibreOffice seems to be working as expected. MS Word is divergent.

Thank You so much. I will pass this information in our community for a future reference.

andjc commented 11 months ago

@SZTSIIT to clarify. LibreOffice visually displays characters like ZWSP so users know it is there and can edit appropriately. When you convert to PDF or print it shouldn't be seen.

The Shan SIL keyboard uses ZWSP with a prebase vowel and removes it and reorders the vowel when the base character is typed.

So the only time you should see it is if a prebase vowel is typed without a base character, so typed in the wrong sequence (mistyped).

If the ZWSP is visible in other contexts there may be a problem with the keyboard or how LibreOffice and Keyman interoperate.

If ZWSP only exists in incomplete or malformed sequences then it is a typing/editing problem.

monghsei commented 11 months ago

@SZTSIIT I have tried changing fonts in the Ubuntu version of LibreOffice and the problems is not solved. I also have tried in Windows versions and the keyboard works fine.

SZTSIIT commented 11 months ago

@SZTSIIT I have tried changing fonts in the Ubuntu version of LibreOffice and the problems is not solved. I also have tried in Windows versions and the keyboard works fine.

​​ၵေႃႉၼၼ်ႉသပ်းလႅင်းၼႄဝႆႉယဝ်ႉၶႃႈ ဢၼ်​​ပေႃးႁဝ်းတႅမ်ႈ ​​​ေ လႄႈ ​ႄ ပဝ်ႇဢမ်ႇမီးတူဝ် သရ ၸွမ်းလင်မၼ်းၼႆ မၼ်း​​တေၼႄဝႆႉပၼ်ဝႃႈ ​​​ေ လႄႈ ​ႄ ၼၼ်ႉပဝ်ႇဝႆႉၼႆ​​ဢေႃႈ။ တႄႇ ​​ပေႃးႁဝ်းမႃး ဢိတ်ႇဢွၵ်ႇ ႁိုဝ် ႁဵတ်းပဵၼ် PDF ႁိုဝ်ၸိူဝ်းၼႆႉတႄႉ မၼ်း​​တေၼႄဝႆႉပၼ် ဢၼ်ပဝ်ႇလွၼ်ႉလွၼ်ႉၼႆၶႃႈ ။ မၼ်းပဵၼ် Feature ၶွင် Libreoffice ၶႃႈၵႂႃႈ ။ ႁဝ်းလွၵ်းမိုဝ်းသင်မႃး​​ပေႃႉ ၼႂ်း Libreoffice ​​ၵေႃႈလီ ၵႂႃႇ Copy မႃး Paste သႂ်ႇ​​ၵေႃႈလီမၼ်းတိုၼ်း​​တေၼႄဝႆႉမႆႉတိုတ်ႉၼၼ်ႉၶႃႈ ၵွပ်ႇ မၼ်းပဵၼ် ​​​ေ ​ႄ ပဝ်ႇ ၶႃႈလု ။ လွၵွးမိုဝ်းတႄႉ ႁဵတ်းၵၢၼ်လီယူႇၶႃႈ။

မႂ်ႇသုင်

LornaSIL commented 7 months ago

Since this does not appear to be a keyboard issue, it appears to be a LibreOffice issue, I am closing this Keyman keyboard Github issue. If the problem remains, this should be raised to LibreOffice.