community icon indicating copy to clipboard operation
community copied to clipboard

Textinput does not render emojis correctly

Open RobinPicard opened this issue 3 years ago • 6 comments

Software Versions

  • Python: 3.9
  • OS: MacOS BigSur 11.4
  • Kivy: v2.2.0.dev0
  • Kivy installation method: development

Describe the bug The textinput widgets render the colored emojis as completely black contrarily to labels that render them corrected

Expected behavior The emojis should be colored

To Reproduce

from kivy.core.window import Window
from kivy.app import App
from kivy.uix.label import Label
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.textinput import TextInput

Window.clearcolor = (1, 1, 1, 1)

class CustomBoxLayout(BoxLayout):
    def __init__(self, *args):
        super().__init__(*args)
        self.a_textinput = TextInput(background_normal='', font_name='NotoColorEmoji.ttf')
        self.a_label = Label(font_name='NotoColorEmoji.ttf')
        self.add_widget(self.a_textinput)
        self.add_widget(self.a_label)
        self.a_textinput.bind(text=self.update_label)

    def update_label(self, instance, text, *args):
        self.a_label.text = text

class MyApp(App):
    def build(self):
        return CustomBoxLayout()

if __name__ == '__main__':
    MyApp().run()

Code and Logs and screenshots Capture d’écran 2022-09-03 à 19 34 03

Additional context I think I found the origin of the problem, I will open a PR shortly

RobinPicard avatar Sep 03 '22 17:09 RobinPicard

@RobinPicard: Just a ping to see how you are going with the PR review comments.

Julian-O avatar Oct 30 '23 04:10 Julian-O

Related #7565

Julian-O avatar Nov 01 '23 02:11 Julian-O

@RobinPicard: Just a ping to see how you are going with the PR review comments.

I'm not working on Kivy-related things anymore, sorry

RobinPicard avatar Dec 01 '23 22:12 RobinPicard

To others reading this, we have a partially implemented PR, with review comments, that needs a volunteer to rebase, address the comments, and commit a new PR.. Could be an easy way to earn Internet points.

Julian-O avatar Dec 02 '23 01:12 Julian-O

@DexerBR has stepped forward with #8491. Thank you muchly!

Julian-O avatar Dec 02 '23 06:12 Julian-O

@DexerBR has stepped forward with #8491. Thank you muchly!

Thanks for your work! Hope this gets fixed soon!

Minimuino avatar Jul 07 '24 17:07 Minimuino