geany-osx icon indicating copy to clipboard operation
geany-osx copied to clipboard

Emoji not displayed

Open djwashburn opened this issue 3 years ago • 22 comments

I cannot see emoji characters in the editor. The emoji keyboard shortcut (Ctrl + Cmd + Spacebar) also does not work within this app. They can be pasted, and successfully copied back out, but they are invisible.

On macOS Big Sur 11.5.1, Intel chip.

djwashburn avatar Aug 13 '21 16:08 djwashburn

WFM on

09:16:38: Geany INFO		: Geany 1.38 (git >= b524a58e), en_AU.UTF-8
09:16:38: Geany INFO		: GTK 3.24.20, GLib 2.64.6
09:16:38: Geany INFO		: OS: Linux Mint 20 (ulyana)

moving to geany-osx as its likely an OSX font problem.

elextr avatar Aug 13 '21 23:08 elextr

I've seen this problem too but I don't know what the problem could be. I actually think it's not a font problem but rather something in pango or other font rendering library.

techee avatar Aug 14 '21 12:08 techee

It looks like two things:

  • invisible emojis, which could indeed be GTK/Pango, which version are you using? And just for the record I have Pango 1.44 and Hack regular font set and emojis show (on Linux).
  • Ctrl+Cmd+spacebar not working, and obviously doesn't work here due to no Cmd key :grin: The Ctrl+Shift+u unicode entry sequence is baked into GTK, and Mattias has refused to make it configurable, so I'm not sure how easy it will be to make the mac sequence work, without adding code to intercept it and insert the emoji yourself.

elextr avatar Aug 14 '21 23:08 elextr

Well, I rather suspect the GTK -> macOS interaction wherever this happens (my guess is Pango macOS backend). It's not about inserting such characters, opening existing file with emoji doesn't work either. Font shouldn't be the issue because the same font used in a native macOS editor works fine.

techee avatar Aug 15 '21 20:08 techee

I don't know what GTK/Pango version, I just installed geany. How would I check the version of dependencies like Pango? And I would confirm what techee said above.

djwashburn avatar Aug 15 '21 23:08 djwashburn

Well, I rather suspect the GTK -> macOS interaction wherever this happens (my guess is Pango macOS backend).

Yeah, likely, and I'm afraid thats about as helpful as I can be with macOS :grin:

@djwashburn does the ctrl+cmd+spacebar insert an emoji that doesn't display but you can copy out the file, or are you reporting that it doesn't insert one either, seems @techee and I read your report differently.

elextr avatar Aug 16 '21 00:08 elextr

Ctrl+Cmd+Spacebar does not even open the emoji keyboard in Geany. It is then necessary to copy and paste emojis from elsewhere, and it is then also true that they are invisible once pasted. Two separate problems, I imagine.

On Sun, Aug 15, 2021 at 8:58 PM elextr @.***> wrote:

Well, I rather suspect the GTK -> macOS interaction wherever this happens (my guess is Pango macOS backend).

Yeah, likely, and I'm afraid thats about as helpful as I can be with macOS 😁

@djwashburn https://github.com/djwashburn does the ctrl+cmd+spacebar insert an emoji that doesn't display but you can copy out the file, or are you reporting that it doesn't insert one either, seems @techee https://github.com/techee and I read your report differently.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/geany/geany-osx/issues/27#issuecomment-899143428, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIKEMW6EKSDPAQCPYLO6PTT5BPDXANCNFSM5CENZQSA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

djwashburn avatar Aug 16 '21 13:08 djwashburn

Any updates on this issue? I know this may seem trivial, but I consider it to be an essential feature. Emoji are a part of the unicode standard and are supported now by every operating system. I will probably switch to another editor if this is not resolved.

djwashburn avatar Aug 24 '21 17:08 djwashburn

I'm afraid this doesn't depend on Geany itself but on other libraries used by Geany and since the problem existed for several years, I'm afraid nobody is working on it.

techee avatar Aug 24 '21 20:08 techee

@techee I suppose emojis display in Scite for OSX (which does not use GTK)? If you get a chance it might just be worth checking.

elextr avatar Aug 24 '21 23:08 elextr

Actually they don't display (only ??s are shown instead of the unicode characters) which is quite surprising - I assumed they would be shown since SciTE doesn't use the GTK backend (and therefore pango & friends). So it could actually be some Apple-specific Scintilla problem.

techee avatar Aug 25 '21 19:08 techee

Hmmm, seems to have been an issue for a while https://github.com/geany/geany/issues/771#issuecomment-196003341

"Emoji" doesn't exist in Geany code (including Scintilla) and I can't figure out how to search in saucefudge Scintilla murcurial so who knows.

[Edit: What I mean is who knows if any patches have been applied since LTS Scintilla]

elextr avatar Aug 25 '21 22:08 elextr

@techee I guess its obvious, but better to ask, I am presuming emojis show in other apps using the same font?

elextr avatar Aug 26 '21 10:08 elextr

Yes, I have all my editors set to Fira Code, and emoji appear in the other editors. Though I imagine the emoji are not actually being displayed in Fira Code, but in a fallback font, probably https://en.wikipedia.org/wiki/Apple_Color_Emoji

djwashburn avatar Aug 26 '21 15:08 djwashburn

Ahhh, I don't think Scintilla does fallback fonts, the style for a lexical entity can only set one font, no fallback list.

elextr avatar Aug 26 '21 20:08 elextr

@elextr Fallback should be handled by Pango or its backend, Scintilla shouldn't have anything to worry about in this area. The same happens on Linux, most fonts don't have all the emoji but a fallback is used for the missing ones (Noto in most cases I guess). However, this could be indeed a fallback issue on OSX, or fonts not accessible from Geany's runtime or such? /me is not macos-literate so wouldn't know though.

b4n avatar Aug 29 '21 08:08 b4n

How does OSX do fontconfig, probably not like linux I guess?

elextr avatar Aug 29 '21 08:08 elextr

@b4n, note above @techee also found Scite OSX (which is not Pango) doesn't do emojis.

elextr avatar Aug 29 '21 08:08 elextr

OK, my bad, I used incorrect file encoding in SciTE on macOS - when set to utf-8, emoji displays correctly there. So it looks like some macOS-GTK-backend-related problem.

techee avatar Sep 02 '21 20:09 techee

For reference, I think this is the corresponding pull request in cairo:

https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/9

techee avatar Nov 17 '21 19:11 techee

I have the exact same problem but on Ubuntu (recent, 22.04, gnome 42.1), and I didn't see other issue on the subject on the central geany repo. I can paste emojis from elsewhere, but always render in blank characters.

rastapopougros avatar Jun 16 '22 13:06 rastapopougros

@rastapopougros if there is no issue for Ubuntu in the main repository, then open one, this is for macos specific issues.

elextr avatar Jun 16 '22 16:06 elextr

I've just made the following builds:

Geany 1.38 built with the latest GTK and other dependencies, including some extra fixes which I plan to release as the official macOS build on the Downloads page unless there are some problems with it: https://download.geany.org/snapshots/geany-1.38_osx-5.dmg https://download.geany.org/snapshots/geany-1.38_osx_arm64-2.dmg

Like the above but Geany and plugins are from current git master: https://download.geany.org/snapshots/geany-1.38_osx.dmg https://download.geany.org/snapshots/geany-1.38_osx_arm64.dmg

Emoji work thanks to a fix in cairo! Geany can finally be used for some serious coding on macOS ;-).

techee avatar Mar 25 '23 18:03 techee