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

Linux dependencies: Build libpng16 for freetype so can render colored emoji #8313

Merged
merged 1 commit into from Jul 16, 2023

Conversation

misl6
Copy link
Member

@misl6 misl6 commented Jul 9, 2023

Maintainer merge checklist

  • Title is descriptive/clear for inclusion in release notes.
  • Applied a Component: xxx label.
  • Applied the api-deprecation or api-break label.
  • Applied the release-highlight label to be highlighted in release notes.
  • Added to the milestone version it was merged into.
  • Unittests are included in PR.
  • Properly documented, including versionadded, versionchanged as needed.

freetype (a dependency of SDL_ttf) should be built with libpng support, otherwise colored emoji which make use of PNG (like the default Noto Color Emoji provided on Ubuntu).

FYI: For Noto Color Emoji, only https://github.com/googlefonts/noto-emoji/blob/main/fonts/NotoColorEmoji_WindowsCompatible.ttf and the NotoColorEmoji.ttf available on /usr/share/fonts/truetype/noto/NotoColorEmoji.ttf seem to render correctly.

Linked issue (do not close as support on macOS -and likely other platforms- is missing): #7565

✅ Tested locally
✅ Tested with wheel (manylinux_x86_64) artifact on Ubuntu 22.04 LTS with bundled NotoColorEmoji font
✅ Tested with wheel (linux_armv7l) artifact on RPi 4 Raspberry OS 32 bit (bullseye) with NotoColorEmoji_WindowsCompatible.ttf font (link above)
⚠️ Unfortunately we do not handle (and maybe SDL does not) an error when rendering is not possible, so we can't add a test ATM.

Demo:

from kivy.app import App
from kivy.lang import Builder
from kivy.uix.boxlayout import BoxLayout


class UI(BoxLayout):
    pass


Builder.load_string(
    """
<UI>:
    Label:
        text: "😀 🎉 📷 👕 🐞"
        font_size: dp(100)
        font_name: "NotoColorEmoji"
"""
)


class Testapp(App):
    def build(self):
        return UI()


Testapp().run()

Output:
Screenshot from 2023-07-15 10-45-02

2023-07-15-111433_1920x1080_scrot

@misl6 misl6 changed the title Linux dependencies: Build libpng16 so freestyle can render colored emoji [build wheel linux] [build wheel armv7l] Linux dependencies: Build libpng16 so freetype can render colored emoji [build wheel linux] [build wheel armv7l] Jul 14, 2023
@misl6 misl6 changed the title Linux dependencies: Build libpng16 so freetype can render colored emoji [build wheel linux] [build wheel armv7l] Linux dependencies: Build libpng16 so freetype can render colored emoji Jul 15, 2023
@misl6 misl6 changed the title Linux dependencies: Build libpng16 so freetype can render colored emoji Linux dependencies: Build libpng16 for freetype so can render colored emoji Jul 15, 2023
@misl6 misl6 added the Component: distribution Wheels, apt PPA, conda, end user install issues label Jul 15, 2023
@misl6 misl6 added this to the 2.3.0 milestone Jul 15, 2023
@misl6 misl6 merged commit dc5c949 into kivy:master Jul 16, 2023
40 checks passed
@misl6 misl6 added the Notes: Release-highlight Highlight this PR in the release notes. label Jul 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: distribution Wheels, apt PPA, conda, end user install issues Notes: Release-highlight Highlight this PR in the release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant