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

Update libpng recipe and build SDL2_ttf vendored freetype with png support, so can render colored emoji #827

Merged
merged 2 commits into from
Jul 16, 2023

Conversation

misl6
Copy link
Member

@misl6 misl6 commented Jul 16, 2023

See: kivy/kivy#7565

Apple Color Emoji and other system fonts are not accessible on iOS, as are located outside of the app sandbox, so the user will need to use an alternative font ATM.

PS: Accessing the system fonts is feasible, via CGFont methods (by reconstructing a .ttf file), and we likely want to introduce this feature on kivy/kivy.

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(80)
        font_name: "./NotoColorEmoji_WindowsCompatible.ttf"
"""
)


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


Testapp().run()

Output:
IMG_0065

Comment on lines 8 to 9
version = '1.6.40'
url = 'https://altushost-swe.dl.sourceforge.net/project/libpng/libpng16/1.6.40/libpng-1.6.40.tar.gz'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we want to make the {version} part of the url?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to WIP, as I was supposed to change this URL to a non-mirror one, but I completely forgot. 🤦
Thank you for the heads up! (will handle it in a separate PR before this one gets merged)

(Our download process seems to not correctly handle a change that sourceforge recently performed)

@misl6 misl6 changed the title Update libpng recipe and build SDL2_ttf vendored freetype with png support, so can render colored emoji [WIP] Update libpng recipe and build SDL2_ttf vendored freetype with png support, so can render colored emoji Jul 16, 2023
@misl6 misl6 changed the title [WIP] Update libpng recipe and build SDL2_ttf vendored freetype with png support, so can render colored emoji Update libpng recipe and build SDL2_ttf vendored freetype with png support, so can render colored emoji Jul 16, 2023
@misl6 misl6 requested a review from AndreMiras July 16, 2023 13:09
@misl6 misl6 merged commit 5f3ad37 into kivy:master Jul 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants