#7995·kivy

Textinput 没有正确渲染 emoji

作者: RobinPicard创建于 2022年9月3日更新于 2026年8月31日
标签Type: Feature

** 软件版本** [PythonH: 3.9] (英语). *OS:MacOS BigSur 11.4 (英语). *克维:v2.2.0.dev0.

  • Kivy安装方法:开发

** 描述错误** 文本输入部件使有色的emojis完全与标签相反,使其得到纠正

** 预期行为** 爱莫吉人应该有颜色

** 废除**

从 kivy. core. 窗口导入窗口
从 kivy. app 导入 App
从 kivy. uix 从标签导入标签
从 kivy. uix. boxlayout 导入 BoxLayout
从 kivy. uix. 文本输入导入文本输入

窗口. cleancolor = (1, 1, 1, 1)

类 自定义框( B) :
df init (本身, *args) :
超级 (. ) (*args)
self.a textinput = TextInput(背景 正态=',字体 名='Noto ColorEmoji.ttf') 互联网档案馆的存檔,存档日期2013-12-21.
自我.a  label=标签(font name='Noto ColorEmoji.ttf')
自定义。 add  widget( self. a  textinput)
自我. add  widget( 自.a  label)
自我. a  textinput.bind(text=self.update label) 自动输入.

def 更新  label( 本身, 实例, 文本, *args ) :
自行.a  label.text=文本

类 MyApp( App) :
def 构建( 自 ) :
返回自定义框Layout ()

如果... 名字... \"... main...":
MyApp (). 运行()

** 代码和日志及截图** <img宽="301" alt="Capture d’écran 2022-09-03 à 19 34 03" src="https://user-images.githubusercontent.com/83579270/188282047-57343112-f9dd-4e53-a337-586d8493c481.png".

** 其他情况** 我想我找到问题的根源了 我很快就会开公关了