Bug 1659748 - Characters get deleted as you type
Summary: Characters get deleted as you type
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: ibus-m17n
Version: 30
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Mike FABIAN
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-16 03:34 UTC by Lohan G
Modified: 2019-07-18 17:33 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)
Screen-captures of the problem with ibus-typing-booster (192.26 KB, video/webm)
2018-12-19 03:48 UTC, Lohan G
no flags Details
Screen-captures of random deletions (without Typing Booster) (183.52 KB, video/webm)
2018-12-19 03:56 UTC, Lohan G
no flags Details
~/ibus-typing-booster-si-wijesekera-emacs-gnome-wayland-f29.png (217.39 KB, image/png)
2018-12-19 07:12 UTC, Mike FABIAN
no flags Details
emoji-picker (876.57 KB, image/png)
2018-12-21 03:19 UTC, Lohan G
no flags Details
Some vowel strokes (diacritics/glyphs) are displayed incorrectly (92.82 KB, image/png)
2018-12-21 09:49 UTC, Lohan G
no flags Details
Vowel strokes (diacritics/glyphs) are displayed incorrectly (Video) (81.82 KB, video/webm)
2018-12-21 09:50 UTC, Lohan G
no flags Details
emacs seems to have problems with rendering Sinhala (70.11 KB, image/png)
2018-12-26 15:17 UTC, Lohan G
no flags Details

Description Lohan G 2018-12-16 03:34:51 UTC
Description of problem:


When you type Sinhala using Wijesekera keyboard layout through ibus the first character gets deleted as soon as you start typing the second character. This is similar to the bug previously reported for Fedora 28 https://bugzilla.redhat.com/show_bug.cgi?id=1617978


How reproducible:


(1) Steps to Reproduce:
1. Open Libre Office Writer (6.1.2.1)
2. Switch to Sinhala; Sinhalese (wijesekera (m17n))
3. Type keys vksIal kjSka
4. Hit space to separate the second word from the first word. And hit space at the end of the first word.

Actual results: ක වීන්


Expected results: ඩනිෂ්ක නවීන්


Additional info: 
(2) When you try this with emacs the results are a little different. I am including it here assuming this is related to the same issue:
This is how to reproduce with emacs:

1. Open emacs 26.1 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.23.2)
 of 2018-08-13
2. Switch to Sinhala; Sinhalese (wijesekera (m17n))
3. Type keys vksIal kjSka
4. Hit space to separate the second word from the first word. And hit space at the end of the first word.

Actual results: ඩනිෂ් කනවී න්

Expected results: ඩනිෂ්ක නවීන්

This adds a space before the last character of the first word, not where you want the space to be.

Comment 1 Mike FABIAN 2018-12-18 15:35:52 UTC
What desktop are you using? Gnome? Under Wayland or under Xorg?

Comment 2 Lohan G 2018-12-18 16:11:09 UTC
(In reply to Mike FABIAN from comment #1)
> What desktop are you using? Gnome? Under Wayland or under Xorg?

I'm using Gnome under Wayland

Comment 3 Mike FABIAN 2018-12-18 16:25:27 UTC
There are two ways to use the Sinhala Wijesekera keyboard through ibus:

1) using ibus-m17n (m17n:si:wijesekera)
2) using ibus-typing-booster

You are using 1), but I also tested 2) and compared.

My test results are as follows:

Gnome-Xorg:
    m17n:si:wijesekera: (It makes no difference whether use-surrounding-text is 0 or 1)
        gedit: OK
        libreoffice (writer): OK
        gnome-terminal: OK (bad rendering, but input works OK)
        emacs: WRONG.
        xterm: WRONG, exactly the same way as in emacs
    typing-booster, si-wijesekera input method:
        gedit: OK
        libreoffice (writer): OK
        gnome-terminal: OK
        emacs: OK
        xterm: OK
Gnome-Wayland:
    m17n:si:wijesekera:
        gedit: OK
        libreoffice (writer): OK
        gnome-terminal: OK
        emacs:WRONG
        xterm: WRONG, exactly the same way as in emacs
    typing-booster, si-wijesekera input method:
        gedit: OK
        libreoffice (writer): OK
        gnome-terminal: OK
        emacs: OK
        xterm: OK
KDE Plasma:
    m17n:si:wijesekera:
        gedit: OK
        libreoffice (writer): OK
        gnome-terminal: OK
        konsole: OK
        kate: OK
        emacs: WRONG
        xterm: WRONG
    typing-booster, si-wijesekera input method:
        gedit: OK
        libreoffice (writer): OK
        gnome-terminal: OK
        konsole: OK
        kate: OK
        emacs: OK
        xterm: OK
        
(Of course the terminals cannot display Sinhala well, but
I can still test whether the input works by typing
    echo '' > /tmp/test
into the terminal, then type the Sinhala between the '' and the return,
then look at the contents of the /tmp/test file for example with gedit)

According to my tests, the desktop does not seem to make a difference.
Sinhala input into programs using XIM like emacs or xterm fails,
it fails in exactly the same way for emacs and xterm, I think it
fails in the same way for all programs using XIM.

Programs using ibus-input modules like gedit, libreoffice,
gnome-terminal, konsole, kate, seem to work fine.

What is different between your tests and mine is that for me
libreoffice works, for you it does *not* work. I don’t understand why,
I used a Fedora 29 installation in qemu with all current updates for
testing.

And what is a bit surprising that using si-wijesekera through ibus-typing-booster
*always* works for me, in all programs, even those using XIM like emacs and xterm.

So using si-wijesekera through ibus-typing-booster might be a workaround
for you until we figure out what the problem with ibus-m17n is.

Comment 4 Lohan G 2018-12-19 01:37:44 UTC
(In reply to Mike FABIAN from comment #3)
> There are two ways to use the Sinhala Wijesekera keyboard through ibus:
> 
> 1) using ibus-m17n (m17n:si:wijesekera)
> 2) using ibus-typing-booster
> 

> 
> So using si-wijesekera through ibus-typing-booster might be a workaround
> for you until we figure out what the problem with ibus-m17n is.

Thanks very much Mike. I am trying to get ibus-typing-booster going following the instructions given here https://mike-fabian.github.io/ibus-typing-booster/documentation.html and here https://fedoramagazine.org/master-typing-ibus-booster/ But I don't see Sinhala (Typing Booster) or something similar among input sources. Other (Typing Booster) doesn't seem to work with Sinhala. Do I have to remove m17n to use typing booster?

Another detail that might be relevant is that my system is not a fresh installation. It has been upgraded through Fedora 27 > 28 > 29.

I can confirm that gedit works with ibus-m17n

Comment 5 Lohan G 2018-12-19 03:46:11 UTC
(In reply to Mike FABIAN from comment #3)
> There are two ways to use the Sinhala Wijesekera keyboard through ibus:
> 
> 1) using ibus-m17n (m17n:si:wijesekera)
> 2) using ibus-typing-booster
> 

> 
> So using si-wijesekera through ibus-typing-booster might be a workaround
> for you until we figure out what the problem with ibus-m17n is.

I'm sorry Mike, please ignore my previous comment! I am now able to use si-wijesekera with ibus-typing-booster. It is somewhat satisfactory. I *can* type better text with it now, so as you suggested, I am going to use it as a temporary solution. 

But the look and feel is very shaky, wobbly and stressful to the eye if you type for longer periods. In my case I spend many hours writing in Sinhala either with emacs orgmode or LibreOffice. To show the problem, I did some screen-captures comparing Fedora 29 an older system (Ubuntu 18.04.) When you type a word in LibreOffice, the word stretches and shrinks in a weird way with "ං "s in between characters. 

And in emacs, the word that is being typed is shown inside a dark box (or a label?), slightly below the actual line.
 
Screen captures (uploaded to Nextcloud) :

Fedora 29 without Typing Booster. When I type several lines, the deletion seems to be very random/arbitrary. By the look of it, this depends on the character you try to type:
https://nc.lohangunaweera.tk/index.php/s/p8qE5WCYf3anerJ

Fedora 29 LibreOffice with ibus-typing-booster
https://nc.lohangunaweera.tk/index.php/s/5794ta6fNHF6my4

Fedora 29 Emacs with ibus-typing-booster
https://nc.lohangunaweera.tk/index.php/s/cSC9c9jKosMKRmz

Compare it with an older system and see the difference. This is very smooth. Words don't break:

Ubuntu 18.04 LibreOffice WITHOUT ibus-typing-booster
https://nc.lohangunaweera.tk/index.php/s/2g7SFcCsFFdxE6m

Comment 6 Lohan G 2018-12-19 03:48:29 UTC
Created attachment 1515469 [details]
Screen-captures of the problem with ibus-typing-booster

Screen-capture. Fedora 29, Libre Office writer with ibus-typing-booster

Comment 7 Lohan G 2018-12-19 03:56:18 UTC
Created attachment 1515470 [details]
Screen-captures of random deletions (without Typing Booster)

Fedora 29. Libre Office without ibus-typing-booster.
Deletion is very random. You can actually type the same two lines with different deletions in the same document!

Comment 8 Mike FABIAN 2018-12-19 06:29:32 UTC
(In reply to Lohan G from comment #5)
> I am now able to use
> si-wijesekera with ibus-typing-booster. It is somewhat satisfactory. I *can*
> type better text with it now, so as you suggested, I am going to use it as a
> temporary solution. 

Good! I’ll try to fix ibus-m17n of course, but that might take some time,
at the moment I have no clue what is going wrong there, it is good that there
is at least some workaround for the moment.

ibus-typing-booster feels a bit different to ibus-m17n, but it also has
some advantages because it remembers words you typed, if you often
type the same stuff, it is often enough to type the first few letters
of a word and then select a suggestion.

> But the look and feel is very shaky, wobbly and stressful to the eye if you
> type for longer periods. In my case I spend many hours writing in Sinhala
> either with emacs orgmode or LibreOffice. To show the problem, I did some
> screen-captures comparing Fedora 29 an older system (Ubuntu 18.04.) When you
> type a word in LibreOffice, the word stretches and shrinks in a weird way
> with "ං "s in between characters. 

I’ll look through your screenshots and videos now and see whether
there is something I could improve. 

> And in emacs, the word that is being typed is shown inside a dark box (or a
> label?), slightly below the actual line.

That is unfortunately *always* the case in emacs when using input methods
like ibus. emacs supports ibus only via XIM and does not support on-the-spot
input style, therefore it cannot show the preedit of such an input method
inline, the preedit is always shown as an extra box. It was never otherwise.
Depending on the desktop used, this box can have a different style and colour,
on Gnome it is a black box with white text.

Comment 9 Mike FABIAN 2018-12-19 07:03:43 UTC
At first glance I noticed two things in your videos showing the use of ibus-typing-booster in Emacs and LibreOffice:

1) Why is there nothing shown in the gnome-panel when ibus-typing-booster is selected? It is just black.
   When ibus-typing-booster is selected, 🚀 (U+1F680 ROCKET) should be shown there.
   Also when switching input methods by typing Super+Space, this rocket emoji
   should be shown, but in your case there is only black.
   Don’t you have any emoji font installed?
   google-noto-emoji-color-fonts-20180814-1.fc29.noarch is a good emoji-font
   package, I thought this was installed by default. Maybe you lack it
   because you updated your system.

2) Why does ibus-typing-booster only show the text you just typed and does not
   show any predictions based on what you typed before or from dictionaries?
   Maybe you don’t have the si_LK dictionary added in the setup tool
   of ibus-typing-booster? It can be added in the “Dictionaries and input methods”
   tab of the setup tool. Or maybe you don’t have hunspell-si installed?

Comment 10 Mike FABIAN 2018-12-19 07:12:02 UTC
Created attachment 1515498 [details]
~/ibus-typing-booster-si-wijesekera-emacs-gnome-wayland-f29.png

In this screenshot you can see that ibus-typing-booster shows
a rocket emoji in the gnome-panel.

And, in emacs I typed only "vk" and got a popup with 5 lines, the top
line shows what I have typed (i.e. what si-wijesekera when typing "vk")
below that I see 4 candidates with labels 1, 2, 3, 4. 
The first two are from the user database, i.e. from what has been typed
before, number 3 and 4 are from the Sinhala hunspell dictionary
(/usr/share/myspell/si_LK.dic). (In this screenshot they are marked
with a little book emoji, that marking of candidates from dictionaries
is a new feature which is only available in the upcoming ibus-typing-booster 1.4.0, but you should still see candidates from the Sinhala hunspell dictionary with your version of ibus-typing-booster, only the candidates will not have any special labels attached)

Comment 11 Lohan G 2018-12-19 09:07:09 UTC
(In reply to Mike FABIAN from comment #10)
> Created attachment 1515498 [details]
> ~/ibus-typing-booster-si-wijesekera-emacs-gnome-wayland-f29.png
> 
> In this screenshot you can see that ibus-typing-booster shows
> a rocket emoji in the gnome-panel.
> 

I already have google-noto-emoji-color-fonts-20180814-1.fc29.noarch installed but that emoji never appeared in the panel.

> And, in emacs I typed only "vk" and got a popup with 5 lines, the top
> line shows what I have typed (i.e. what si-wijesekera when typing "vk")
> below that I see 4 candidates with labels 1, 2, 3, 4. 
> The first two are from the user database, i.e. from what has been typed
> before, number 3 and 4 are from the Sinhala hunspell dictionary
> (/usr/share/myspell/si_LK.dic). (In this screenshot they are marked
> with a little book emoji, that marking of candidates from dictionaries
> is a new feature which is only available in the upcoming ibus-typing-booster
> 1.4.0, but you should still see candidates from the Sinhala hunspell
> dictionary with your version of ibus-typing-booster, only the candidates
> will not have any special labels attached)

I have hunspell-si installed but the popup slows down the typing speed. I tried various combinations of options before getting it disabled. I think selecting "Enable suggestions by key" disables the suggestions. It sometimes takes more than 15 seconds for the popup to show the suggestions.

Comment 12 Lohan G 2018-12-19 09:21:59 UTC
(In reply to Mike FABIAN from comment #8)
> (In reply to Lohan G from comment #5)
> > I am now able to use
> > si-wijesekera with ibus-typing-booster. It is somewhat satisfactory. I *can*
> > type better text with it now, so as you suggested, I am going to use it as a
> > temporary solution. 
> 
> Good! I’ll try to fix ibus-m17n of course, but that might take some time,
> at the moment I have no clue what is going wrong there, it is good that there
> is at least some workaround for the moment.
> 
> ibus-typing-booster feels a bit different to ibus-m17n, but it also has
> some advantages because it remembers words you typed, if you often
> type the same stuff, it is often enough to type the first few letters
> of a word and then select a suggestion.
> 
> > But the look and feel is very shaky, wobbly and stressful to the eye if you
> > type for longer periods. In my case I spend many hours writing in Sinhala
> > either with emacs orgmode or LibreOffice. To show the problem, I did some
> > screen-captures comparing Fedora 29 an older system (Ubuntu 18.04.) When you
> > type a word in LibreOffice, the word stretches and shrinks in a weird way
> > with "ං "s in between characters. 
> 
> I’ll look through your screenshots and videos now and see whether
> there is something I could improve. 

Thanks very much for looking into this! A couple of other distros have the same issue at the moment (I checked Debian (stable), Manjaro and Ubuntu 18.10 over the past couple of days. All have some combination of the same set of problems. They either add a space before the last sentence of a word or delete random characters)

> 
> > And in emacs, the word that is being typed is shown inside a dark box (or a
> > label?), slightly below the actual line.
> 
> That is unfortunately *always* the case in emacs when using input methods
> like ibus. emacs supports ibus only via XIM and does not support on-the-spot
> input style, therefore it cannot show the preedit of such an input method
> inline, the preedit is always shown as an extra box. It was never otherwise.
> Depending on the desktop used, this box can have a different style and
> colour,
> on Gnome it is a black box with white text.

I see. Until very recently I used SCIM in a very outdated Trisquel 6 installation. It had one character in the box, the character you types last. Not the entire word. I think that's what made me think there's something wrong here. I can get used to the box, if it doesn't delete characters or add random spaces in the middle of the words.

Comment 13 Mike FABIAN 2018-12-19 09:46:57 UTC
(In reply to Lohan G from comment #11)
> 
> I have hunspell-si installed but the popup slows down the typing speed. I
> tried various combinations of options before getting it disabled. I think
> selecting "Enable suggestions by key" disables the suggestions. It sometimes
> takes more than 15 seconds for the popup to show the suggestions.

Right, selecting "Enable suggestions by key" makes things a lot faster.
If you happen to want the popup to complete some word, you can still type
Tab to get the popup.

15 seconds is very slow though, usually the popup should showup *much* faster.
Maybe you have the option

   “Unicode symbols and emoji predictions”

enabled. Enabling this option really slows things down a lot.

Comment 14 Mike FABIAN 2018-12-19 09:49:57 UTC
(In reply to Lohan G from comment #12)
> (In reply to Mike FABIAN from comment #8)
> > (In reply to Lohan G from comment #5)
> > > I am now able to use
> > > si-wijesekera with ibus-typing-booster. It is somewhat satisfactory. I *can*
> > > type better text with it now, so as you suggested, I am going to use it as a
> > > temporary solution. 
> > 
> > Good! I’ll try to fix ibus-m17n of course, but that might take some time,
> > at the moment I have no clue what is going wrong there, it is good that there
> > is at least some workaround for the moment.

I updated ibus-m17n to 1.4.1, available here:

https://bodhi.fedoraproject.org/updates/FEDORA-2018-b10cae47d5

Unfortunately that makes no difference, the problem when typing into Emacs
is still there.

I really have to investigate this ...

Comment 15 Mike FABIAN 2018-12-19 09:54:33 UTC
(In reply to Lohan G from comment #11)
> (In reply to Mike FABIAN from comment #10)
> > Created attachment 1515498 [details]
> > ~/ibus-typing-booster-si-wijesekera-emacs-gnome-wayland-f29.png
> > 
> > In this screenshot you can see that ibus-typing-booster shows
> > a rocket emoji in the gnome-panel.
> > 
> 
> I already have google-noto-emoji-color-fonts-20180814-1.fc29.noarch
> installed but that emoji never appeared in the panel.

Of course this has nothing to do with the problem of typing
Sinhala, but that the emoji don’t show is still quite weird.

I have no idea at the moment what could cause this, it works for me.

Do you have the emoji-picker package installed?

If yes, it would be interesting whether emoji-picker can display
emoji on you system or not.

emoji-picker should look like this:

http://mike-fabian.github.io/ibus-typing-booster/documentation.html#emoji-picker

If you cannot display any emoji at all on your system, I guess
it will just show white boxes??

Comment 16 Lohan G 2018-12-20 05:00:22 UTC
(In reply to Mike FABIAN from comment #15)

> 
> Do you have the emoji-picker package installed?
> 
> If yes, it would be interesting whether emoji-picker can display
> emoji on you system or not.
> 
> emoji-picker should look like this:
> 
> http://mike-fabian.github.io/ibus-typing-booster/documentation.html#emoji-
> picker
> 
> If you cannot display any emoji at all on your system, I guess
> it will just show white boxes??

I installed it and had a look. And yes, it just shows white boxes.

Comment 17 Lohan G 2018-12-20 05:06:41 UTC
(In reply to Mike FABIAN from comment #14)
 
> I updated ibus-m17n to 1.4.1, available here:
> 
> https://bodhi.fedoraproject.org/updates/FEDORA-2018-b10cae47d5
> 

Thanks! I'll wait until it arrives as an update.

My temporary workaround is using gedit (markdown) with ibus-typing-booster. It makes typing far more smoother. 

> Unfortunately that makes no difference, the problem when typing into Emacs
> is still there.
> 
> I really have to investigate this ...

Comment 18 Mike FABIAN 2018-12-20 08:34:05 UTC
(In reply to Lohan G from comment #17)
> (In reply to Mike FABIAN from comment #14)
>  
> > I updated ibus-m17n to 1.4.1, available here:
> > 
> > https://bodhi.fedoraproject.org/updates/FEDORA-2018-b10cae47d5
> > 
> 
> Thanks! I'll wait until it arrives as an update.

But it won’t fix your problem. I will investigate what is the problem in ibus-m17n
but this update unfortunately doesn’t yet fix it ☹

> My temporary workaround is using gedit (markdown) with ibus-typing-booster.
> It makes typing far more smoother. 

I will release an update for ibus-typing-booster soon though which might 
improve the user experience for you a bit. You are using the mode
where you need to press Tab to see suggestions (because of speed and maybe
because you rarely need the suggestions). In ibus-typing-booster-1.4.0
you can choose to have the preedit without an underline, or to get the underline
only after you pressed Tab to see suggestions. That means that you don't have to see
the underline usually while typing which makes it at least look like a bit more
like when typing with ibus-m17n.

Comment 19 Lohan G 2018-12-20 09:18:34 UTC
(In reply to Mike FABIAN from comment #18)

> 
> > My temporary workaround is using gedit (markdown) with ibus-typing-booster.
> > It makes typing far more smoother. 
> 
> I will release an update for ibus-typing-booster soon though which might 
> improve the user experience for you a bit. You are using the mode
> where you need to press Tab to see suggestions (because of speed and maybe
> because you rarely need the suggestions). In ibus-typing-booster-1.4.0
> you can choose to have the preedit without an underline, or to get the
> underline
> only after you pressed Tab to see suggestions. That means that you don't
> have to see
> the underline usually while typing which makes it at least look like a bit
> more
> like when typing with ibus-m17n.

Yes! Removing the underline (or making it appear when the Tab key is pressed) will be extremely helpful.

Even though I rarely rely on suggestions, I find its ability to remember my usage very useful.

Comment 20 Mike FABIAN 2018-12-20 10:02:30 UTC
(In reply to Lohan G from comment #16)
> (In reply to Mike FABIAN from comment #15)
> > 
> > http://mike-fabian.github.io/ibus-typing-booster/documentation.html#emoji-
> > picker
> > 
> > If you cannot display any emoji at all on your system, I guess
> > it will just show white boxes??
> 
> I installed it and had a look. And yes, it just shows white boxes.

Can you attach a screenshot of this?
In emoji-picker, you can switch to a black and white emoji-font, "Symbola".

(There is a font switcher menu at the top).

If you do that, I *guess* that you will see the black and white emoji.
But only in emoji-picker ☹. If you click on an emoji in emoji-picker
and then paste it somewhere else, for example into gedit,
most likely you will see only blank space in gedit because your
system is set up to use color emoji fonts and somehow that doesn't work.

If you paste an emoji into LibreOffice, you will probably see it as
LibreOffice cannot show emoji in colour yet and always shows them in
black and white.

Comment 21 Mike FABIAN 2018-12-20 16:17:08 UTC
(In reply to Lohan G from comment #19)
> (In reply to Mike FABIAN from comment #18)
> 
> > 
> > > My temporary workaround is using gedit (markdown) with ibus-typing-booster.
> > > It makes typing far more smoother. 
> > 
> > I will release an update for ibus-typing-booster soon though which might 
> > improve the user experience for you a bit. You are using the mode
> > where you need to press Tab to see suggestions (because of speed and maybe
> > because you rarely need the suggestions). In ibus-typing-booster-1.4.0
> > you can choose to have the preedit without an underline, or to get the
> > underline
> > only after you pressed Tab to see suggestions. That means that you don't
> > have to see
> > the underline usually while typing which makes it at least look like a bit
> > more
> > like when typing with ibus-m17n.
> 
> Yes! Removing the underline (or making it appear when the Tab key is
> pressed) will be extremely helpful.
> 
> Even though I rarely rely on suggestions, I find its ability to remember my
> usage very useful.

I released the ibus-typing-booster-1.4.0 update now:

https://bodhi.fedoraproject.org/updates/FEDORA-2018-f948d3369a

but I just remembered that you use Gnome Wayland. Unfortunately
under Wayland the preedit style is ignored. Wayland always
draws the underline under the preedit, even if the input method
requests to turn it off. So ibus-typing-booster does have this
nice new option now but it doesn’t work under Wayland ☹.
I think sometime in the future this will be fixed in Wayland though
and then it will start working.

Comment 22 Lohan G 2018-12-21 03:19:02 UTC
Created attachment 1516023 [details]
emoji-picker

These are the white boxes. But yes, I am able to use Symbola imojis as you mentioned.

Comment 23 Lohan G 2018-12-21 03:22:00 UTC
(In reply to Mike FABIAN from comment #21)

> 
> I released the ibus-typing-booster-1.4.0 update now:
> 
> https://bodhi.fedoraproject.org/updates/FEDORA-2018-f948d3369a
> 
> but I just remembered that you use Gnome Wayland. Unfortunately
> under Wayland the preedit style is ignored. Wayland always
> draws the underline under the preedit, even if the input method
> requests to turn it off. So ibus-typing-booster does have this
> nice new option now but it doesn’t work under Wayland ☹.
> I think sometime in the future this will be fixed in Wayland though
> and then it will start working.

What is the best known setup to use this? I already have LXDE installed. Or should I switch to Gnome Xorg?

Comment 24 Lohan G 2018-12-21 03:57:52 UTC
(In reply to Mike FABIAN from comment #21)

> 
> I released the ibus-typing-booster-1.4.0 update now:
> 
> https://bodhi.fedoraproject.org/updates/FEDORA-2018-f948d3369a
> 
> but I just remembered that you use Gnome Wayland. Unfortunately
> under Wayland the preedit style is ignored. Wayland always
> draws the underline under the preedit, even if the input method
> requests to turn it off. So ibus-typing-booster does have this
> nice new option now but it doesn’t work under Wayland ☹.
> I think sometime in the future this will be fixed in Wayland though
> and then it will start working.

I also got a couple of issues and enhancement requests to report separately on ibus-typing-booster. Are things likely to improve with Gnome Wayland or should I consider moving to something else (Gnome Xorg, or LXDE for example) if I am to get the full use of it?

Comment 25 Lohan G 2018-12-21 04:22:34 UTC
I just switched to Xorg. I am now able to type Sinhala in Libre Office without any issue. The look and feel is now identical to the Ubuntu 18.04 system I checked. That too has Gnome Xorg.

Problem with emacs still remains. 

The issues I wanted to report regarding ibus-typing-booster are already reported by others. Example: https://bugzilla.redhat.com/show_bug.cgi?id=1637647 
They all point to Wayland.

Comment 26 Mike FABIAN 2018-12-21 07:48:01 UTC
(In reply to Lohan G from comment #23)
> (In reply to Mike FABIAN from comment #21)
> 
> > 
> > I released the ibus-typing-booster-1.4.0 update now:
> > 
> > https://bodhi.fedoraproject.org/updates/FEDORA-2018-f948d3369a
> > 
> > but I just remembered that you use Gnome Wayland. Unfortunately
> > under Wayland the preedit style is ignored. Wayland always
> > draws the underline under the preedit, even if the input method
> > requests to turn it off. So ibus-typing-booster does have this
> > nice new option now but it doesn’t work under Wayland ☹.
> > I think sometime in the future this will be fixed in Wayland though
> > and then it will start working.
> 
> What is the best known setup to use this? I already have LXDE installed. Or
> should I switch to Gnome Xorg?

I don’t know really, it is a matter of preference. Personally I am using i3,
but I think all of these are fine.

If you like Gnome, you could try Gnome Xorg. 

Of course Wayland will be the future, and it is already the default, so
this really should be fixed in Wayland.

Comment 27 Mike FABIAN 2018-12-21 07:52:00 UTC
(In reply to Lohan G from comment #22)
> Created attachment 1516023 [details]
> emoji-picker
> 
> These are the white boxes. But yes, I am able to use Symbola imojis as you
> mentioned.

You can probably force your system to use black and white emoji everywhere
by creating a file ~/.config/fontconfig/fonts.conf with the following contents
(It is weird that colour emoji don’t work, but I have no idea at the moment what could cause this):

<?xml version="1.0"?>
<fontconfig>
	<!-- Prefer to match color or black-and-white emoji font. -->
	<match>
		<test name="lang">
			<string>und-zsye</string>
		</test>
		<test qual="all" name="color" compare="not_eq">
			<bool>true</bool>
		</test>
		<test qual="all" name="color" compare="not_eq">
			<bool>false</bool>
		</test>
		<edit name="color" mode="append">
			<bool>false</bool> <!-- ◀ Choose here -->
		</edit>
	</match>

	<alias binding="same">
		<family>emoji</family>
		<prefer>
			<family>Symbola</family>
			<family>Noto Color Emoji</family>
			<family>Emoji One</family>
			<family>Noto Emoji</family>
		</prefer>
	</alias>

</fontconfig>

Comment 28 Mike FABIAN 2018-12-21 08:04:06 UTC
(In reply to Lohan G from comment #24)
> (In reply to Mike FABIAN from comment #21)
> 
> I also got a couple of issues and enhancement requests to report separately
> on ibus-typing-booster.

Thank you!

> Are things likely to improve with Gnome Wayland or
> should I consider moving to something else (Gnome Xorg, or LXDE for example)
> if I am to get the full use of it?

I have no idea how long this will take. I reported a bug:

https://bugzilla.redhat.com/show_bug.cgi?id=1651383

This is the upstream bug for the preedit styling:

https://gitlab.gnome.org/GNOME/mutter/issues/153

Comment 29 Mike FABIAN 2018-12-21 08:12:44 UTC
(In reply to Lohan G from comment #25)
> I just switched to Xorg. I am now able to type Sinhala in Libre Office
> without any issue. The look and feel is now identical to the Ubuntu 18.04
> system I checked. That too has Gnome Xorg.
> 
> Problem with emacs still remains. 
> 
> The issues I wanted to report regarding ibus-typing-booster are already
> reported by others. Example:
> https://bugzilla.redhat.com/show_bug.cgi?id=1637647 
> They all point to Wayland.

Yes, unfortunately there are still several problems with input methods
on Wayland, not only the preedit styling. Surrounding text support
also seems severely broken.

I am wondering whether I should at yet another option to ibus-typing-booster
to disable surrounding text support as a workaround when surrounding
text support is broken ... would be nicer if surrounding text support
were fixed though ...

Comment 30 Mike FABIAN 2018-12-21 08:25:16 UTC
(In reply to Lohan G from comment #25)
> I just switched to Xorg. I am now able to type Sinhala in Libre Office
> without any issue. The look and feel is now identical to the Ubuntu 18.04
> system I checked. That too has Gnome Xorg.
> 
> Problem with emacs still remains. 

Yes, ibus-m17n with si-wijesekera has a problem with xterm and
probably with all programs using XIM. I will look into this,
but I expect this is going to be difficult.

But ibus-typing-booster works in emacs with si-wijesekera, doesn’t it?

Comment 31 Lohan G 2018-12-21 09:49:50 UTC
Created attachment 1516072 [details]
Some vowel strokes (diacritics/glyphs) are displayed incorrectly

Even with ibus-typing-booster, some of the vowel strokes (diacritics/glyphs) are displayed incorrectly. I am now testing this on Gnome Xorg. Attached image shows the difference between gedit and emacs. Gedit shows it correctly.

Comment 32 Lohan G 2018-12-21 09:50:54 UTC
Created attachment 1516073 [details]
Vowel strokes (diacritics/glyphs) are displayed incorrectly (Video)

Even with ibus-typing-booster, some of the vowel strokes (diacritics/glyphs) are displayed incorrectly. I am now testing this on Gnome Xorg. Attached image shows the difference between gedit and emacs. Gedit shows it correctly.

Comment 33 Lohan G 2018-12-21 09:54:04 UTC
(In reply to Mike FABIAN from comment #30)

> 
> But ibus-typing-booster works in emacs with si-wijesekera, doesn’t it?

I encountered more problems with emacs. I uploaded a screenshot and video clip. Even if I ignore the difficulty of having the whole word inside the back box slightly below the actual line, there are places where characters/diacritics/glyphs are shown incorrectly. Gedit shows the word correctly https://bugzilla.redhat.com/attachment.cgi?id=1516073

Comment 34 Lohan G 2018-12-21 10:09:14 UTC
I now have a reasonably OK workaround as I can use gedit instead of emacs. And Libre Office works fine. Thanks for adding me to other bug reports. I hope they'll get resolved soon.

Comment 35 Lohan G 2018-12-21 10:46:22 UTC
(In reply to Lohan G from comment #34)
> I now have a reasonably OK workaround as I can use gedit instead of emacs.
> And Libre Office works fine. Thanks for adding me to other bug reports. I
> hope they'll get resolved soon.

Clarification:
This workaround is satisfactory only after switching to Xorg, and combining with ibus-typing-booster

Initial issues are still there for those who want Fedora (Gnome + Wayland) to support Sinhala input out of the box.

Comment 36 Mike FABIAN 2018-12-22 23:42:11 UTC
(In reply to Lohan G from comment #32)
> Created attachment 1516073 [details]
> Vowel strokes (diacritics/glyphs) are displayed incorrectly (Video)
> 
> Even with ibus-typing-booster, some of the vowel strokes (diacritics/glyphs)
> are displayed incorrectly. I am now testing this on Gnome Xorg. Attached
> image shows the difference between gedit and emacs. Gedit shows it correctly.

I wonder whether this is a problem of ibus-typing-booster or a problem of emacs. 
If you type into emacs like you do in your video and then mark the finished text with the mouse and then paste it into gedit, what happens? Is the text pasted into gedit still wrong or does it look correct after pasting?

Or, another way of doing this: Type into emacs, save into a file. Then view the file in gedit.
Does it still look wrong in gedit then?

If it becomes correct when viewing in gedit it would mean that rendering of Sinhala in emacs is broken.
If loading it into gedit does not fix the problem, it would indicate that something went wrong during input already. 

What was the sequence of keys you typed in this video?

Comment 37 Lohan G 2018-12-26 15:17:44 UTC
Created attachment 1516908 [details]
emacs seems to have problems with rendering Sinhala

Same test file opened in gedit and emacs

Comment 38 Lohan G 2018-12-26 15:22:52 UTC
(In reply to Mike FABIAN from comment #36)
> (In reply to Lohan G from comment #32)

> I wonder whether this is a problem of ibus-typing-booster or a problem of
> emacs. 
> If you type into emacs like you do in your video and then mark the finished
> text with the mouse and then paste it into gedit, what happens? Is the text
> pasted into gedit still wrong or does it look correct after pasting?
> 
> Or, another way of doing this: Type into emacs, save into a file. Then view
> the file in gedit.
> Does it still look wrong in gedit then?
> 
> If it becomes correct when viewing in gedit it would mean that rendering of
> Sinhala in emacs is broken.
> If loading it into gedit does not fix the problem, it would indicate that
> something went wrong during input already. 
> 
> What was the sequence of keys you typed in this video?

Hello Mike, I am sorry I didn't have Internet access over the past few days so it took longer than I thought to reply. 

You are correct. This seems to be a problem with emacs.

I created a file using emacs (with ibus-typing-booster). Emacs shows it incorrectly. But when I open the same file in gedit it looks correct. Here's a screenshot https://bugzilla.redhat.com/attachment.cgi?id=1516908

(1) Steps to Reproduce:
1. Open Emacs 26.1 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.23.2)
2. Switch to ibus-typing-booster
3. Type keys (fisrt Sinhala line of the image) wlqrq iy rQm 
4. Save the file
5. Open it with gedit and compare

Expected result අකුරු සහ රූප
Actual result in emacs (see attached image)

In addition to this, I found emacs doesn't display some characters at all while they are clearly shown by gedit

(2) Steps to Reproduce
1. Open Emacs 26.1 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.23.2)
2. Switch to ibus-typing-booster
3. Type keys f.daravaka (Second Sinhala line shown in the image)
4. Save file
5. Open it with gedit and compare

Expected result ගෝර්ඩ්න් 
Actual result in emacs ර්ඩ්න් (see attached image)

The other two lines also have missing first character in emacs. 

Where should I take this, should I create a separate bug here or upstream with emacs?

Comment 39 Mike FABIAN 2018-12-27 08:35:36 UTC
(In reply to Lohan G from comment #38)
> (In reply to Mike FABIAN from comment #36)
> > (In reply to Lohan G from comment #32)

> Hello Mike, I am sorry I didn't have Internet access over the past few days
> so it took longer than I thought to reply. 

No problem, I also have very limited Internet access until New Year.

> You are correct. This seems to be a problem with emacs.

[...] 

> Where should I take this, should I create a separate bug here or upstream
> with emacs?

Maybe both? I don’t know enough about Emacs to be able to look into
this problem. But I use Emacs myself a log and I am interested to
learn more about this, so you can put me into the CC if you report a
bug.

Comment 40 Danishka Navin 2019-07-18 17:33:23 UTC
@Lohan, 

Were you able to file a bug?


Note You need to log in before you can comment on or make changes to this bug.