Cannot access glyphs (GlyphInfo) in Pango
The glyphs
property of GlyphString in Pango triggers "Stack overflow protection. Can't copy array element into GIArgument." message and always returns an empty list.
Minimal example:
import gi
gi.require_version("Pango", "1.0")
gi.require_version("PangoFT2", "1.0")
from gi.repository import Pango, PangoFT2
text = 'Some text'
ctx = Pango.Context()
font_map = PangoFT2.FontMap()
ctx.set_font_map(font_map)
layout = Pango.Layout(ctx)
layout.set_text(text)
lines = layout.get_lines()
# Trying to access GlyphString.glyphs property
glyph_string = lines[0].runs[0].glyphs
print(glyph_string.glyphs) # <-- returns empty list, triggers "Stack overflow protection" message