# How to access glyph.layers in objective-c class GSGlyph

**URL:** <https://forum.glyphsapp.com/t/how-to-access-glyph-layers-in-objective-c-class-gsglyph/36275>\
**Category:** Scripting\
**Created:** [May 3, 2026, 4:12pm UTC](https://forum.glyphsapp.com/t/how-to-access-glyph-layers-in-objective-c-class-gsglyph/36275 "2026-05-03T16:12:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SCarewe](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/scarewe/32/18952_2.png) [@SCarewe](https://forum.glyphsapp.com/u/SCarewe)\
**Post date:** [May 3, 2026, 4:12pm UTC](https://forum.glyphsapp.com/t/how-to-access-glyph-layers-in-objective-c-class-gsglyph/36275/1 "2026-05-03T16:12:53Z")

</div>

Hello, I am running into an odd issue: I am using the method `processFont_withArguments_()` in a Python filter.

When I run it on a variable font setting and try `print(font.glyphs[0].layers)`, Glyphs immediately crashes.

I read the type of the glyph object, and I get “objective-c class GSGlyph”, instead of “objective-c class NSKVONotifying\_GSGlyph”, which is what GSGlyph objects usually are in the Python environment.

How can I access a glyph’s layers in this case?

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [May 3, 2026, 4:38pm UTC](https://forum.glyphsapp.com/t/how-to-access-glyph-layers-in-objective-c-class-gsglyph/36275/2 "2026-05-03T16:38:48Z")

</div>

That print statement should be fine. There is something else that causes the crash.

And the type string should be OK either way.

---

<div class="post-metadata">

**Author:** ![SCarewe](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/scarewe/32/18952_2.png) [@SCarewe](https://forum.glyphsapp.com/u/SCarewe)\
**Post date:** [May 3, 2026, 4:43pm UTC](https://forum.glyphsapp.com/t/how-to-access-glyph-layers-in-objective-c-class-gsglyph/36275/3 "2026-05-03T16:43:39Z")

</div>

Printing just the glyph works fine:

```auto
print(font.glyphs[0])

```

But printing its layers causes Glyphs to crash.

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [May 3, 2026, 6:51pm UTC](https://forum.glyphsapp.com/t/how-to-access-glyph-layers-in-objective-c-class-gsglyph/36275/4 "2026-05-03T18:51:13Z")

</div>

There is something wrong with the python runtime at that point. Could you send me a plugin that triggers the crash?
