Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to python-gi #1

Open
takluyver opened this issue Sep 3, 2012 · 2 comments
Open

Migrate to python-gi #1

takluyver opened this issue Sep 3, 2012 · 2 comments

Comments

@takluyver
Copy link
Member

This issue is to track the migration to the gobject-introspect bindings, which replace the deprecated pygtk bindings.

The current state of the effort is in a gtk3 branch: https://github.com/labyrinth-team/labyrinth/tree/gtk3

@takluyver
Copy link
Member Author

My first attempt at porting got stuck on some parts of pango that aren't yet exposed through the bindings - specifically, the means to create and combine Pango 'attributes', which represent a font style option (such as bold) together with the span of text to which it should be applied.

This code in Pitivi works around something similar, and I exchanged emails with the author of that bit, Matas Brazdeikis. But I couldn't get it working within Labyrinth.

Potential ways out:

  • Pango can expose the necessary bits to introspection in future versions (see e.g. this bug)
  • Matas may be able to look more closely at our code at some point.
  • There may be another way of coding without directly controlling pango. But even if there is, I've no idea what it might be.

@takluyver
Copy link
Member Author

The GObject introspection interface to Pango has improved somewhat, and I was able to get a bit further. I also started making it Python 3 compatible, because that was easier than getting the bindings set up on Python 2 again.

However, I'm stuck - for now - on another limitation of the Pango introspection API: https://gitlab.gnome.org/GNOME/pango/-/issues/476 . Specifically, it fails on a line like this:

pango_font = x.desc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant