STINNER Victor <vstin...@python.org> added the comment:

The following program fails with:
---
X Error of failed request:  BadLength (poly request too large or internal Xlib 
length error)
  Major opcode of failed request:  138 (RENDER)
  Minor opcode of failed request:  20 (RenderAddGlyphs)
  Serial number of failed request:  4248
  Current serial number in output stream:  4956
---

Python program:
---
from tkinter import Tk
from tkinter.scrolledtext import ScrolledText
root = Tk()
text = ScrolledText(root, width=80, height=40)
text.pack()

for i in range(0x10000, 0x40000, 32):
    chars = ''.join(chr(i+j) for j in range(32))
    text.insert('insert', f"{hex(i)} {chars}\n")

input("Press enter to exit")
---

It seems like the first character which triggers this RenderAddGlyphs BadLength 
issue is: U+1f6c2. See attached emoji.png screenshot. As you can see, some 
emojis are rendered in color in Gnome Terminal. I guess that it uses the Gtk 3 
pango library to render these characters.

----------
Added file: https://bugs.python.org/file49567/emojis.png

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42225>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to