Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gtk4: Emoji rendering broken #22809

Open
1 task done
cal0pteryx opened this issue Dec 15, 2024 · 9 comments · May be fixed by #23337
Open
1 task done

gtk4: Emoji rendering broken #22809

cal0pteryx opened this issue Dec 15, 2024 · 9 comments · May be fixed by #23337
Labels
bug reported-upstream Issues reported or fixed in upstream repository

Comments

@cal0pteryx
Copy link

Description / Steps to reproduce the issue

  • install mingw-w64-gtk4 (current version: 4.16.7-1)
  • start gtk4-demo.exe
  • run any demo where it's possible to add emojis, e.g. with a GtkEntry, right click, insert emoji

https://gitlab.gnome.org/GNOME/gtk/-/issues/7144 has more info on this and it seems that for MSYS, some patches are applied which break emoji rendering on MSYS.

Expected behavior

Emojis should be rendered correctly

Actual behavior

Emojis are not rendered correctly:

image

Verification

Windows Version

MSYS_NT-10.0-26100

Are you willing to submit a PR?

No response

@cal0pteryx cal0pteryx added the bug label Dec 15, 2024
@Biswa96 Biswa96 transferred this issue from msys2/MSYS2-packages Dec 15, 2024
@Biswa96
Copy link
Member

Biswa96 commented Jan 7, 2025

gtk4 has been updated to 4.16.12 version. Does the issue still remain?

@lovetox
Copy link
Contributor

lovetox commented Jan 7, 2025

i dont know why it should, the linked issue is open, and the pango mingw package still aplies a font patch https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-pango/0001-disable-dwrite.patch which seems to cause that issue.

@lovetox
Copy link
Contributor

lovetox commented Jan 7, 2025

@lazka you were involved when the dwrite patch was added.

It seems the dwrite disable patch was added because of https://gitlab.gnome.org/GNOME/pango/-/issues/767

In this issue there is now a user that says that the 001-fix-font-rendering.patch in Gtk should be enough to solve the issue, so maybe we can drop this patch in pango now?

@lazka
Copy link
Member

lazka commented Jan 7, 2025

In this issue there is now a user that says that the 001-fix-font-rendering.patch in Gtk should be enough to solve the issue, so maybe we can drop this patch in pango now?

That were two separate issues IIRC, one for the anti-alias colors being wrong in cairo, and one for anti-aliasing being disabled in gtk completely. But sure, I can try.

@lb90
Copy link
Collaborator

lb90 commented Jan 8, 2025

Hi everyone! 🙂

I am finishing an MR in Cairo which addresses the problem of color fringing: https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/602. Once finished we can include it as a patch and enable DWrite fonts in Cairo

@Biswa96 Biswa96 added the reported-upstream Issues reported or fixed in upstream repository label Jan 8, 2025
@lb90 lb90 linked a pull request Feb 10, 2025 that will close this issue
@lb90
Copy link
Collaborator

lb90 commented Feb 10, 2025

Ok, opened a PR!

@cal0pteryx
Copy link
Author

Cairo 1.18.4 has just been released. Among other fixes, the following should be relevant for this issue:

the DirectWrite backend now supports font variations and proper glyph coverage

and this package:

The DirectWrite backend now builds on MINGW 11

Should I open an issue for updating the cairo package?

lb90 added a commit to lb90/MINGW-packages that referenced this issue Mar 9, 2025
The color fringing issue with Cairo DWrite fonts has been
fixed in the latest release, Cairo 1.18.4.

Fixes msys2#22809

References:
  - https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/602
lb90 added a commit to lb90/MINGW-packages that referenced this issue Mar 9, 2025
The color fringing issue with Cairo DWrite fonts has been
fixed in the latest release, Cairo 1.18.4.

Fixes msys2#22809

References:
  - https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/602
@lb90
Copy link
Collaborator

lb90 commented Mar 9, 2025

Hi @cal0pteryx! I have now updated the PR

@cal0pteryx
Copy link
Author

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug reported-upstream Issues reported or fixed in upstream repository
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants