Behdad Esfahbod

Results 1487 comments of Behdad Esfahbod

> This is not working for me, though. If I try something like `hb.cairo_font_face_create_for_font(font)`, I get: > > ``` > gi.repository.GLib.GError: g-invoke-error-quark: Could not locate hb_cairo_font_face_create_for_font: 'hb_cairo_font_face_create_for_font': dlsym(0x7ff91e8adad0, hb_cairo_font_face_create_for_font): symbol...

> This is not working for me, though. If I try something like `hb.cairo_font_face_create_for_font(font)`, I get: > > ``` > gi.repository.GLib.GError: g-invoke-error-quark: Could not locate hb_cairo_font_face_create_for_font: 'hb_cairo_font_face_create_for_font': dlsym(0x7ff91e8adad0, hb_cairo_font_face_create_for_font): symbol...

> Traceback (most recent call last): > File "src/sample.py", line 26, in > hb.cairo_font_face_create_for_font (font) > TypeError: Couldn't find foreign struct converter for 'cairo.FontFace' Humm we're just passing pointers around....

If I'm reading this right, looks like cairo gi bindings are handwritten, and very incomplete to my eyes: https://github.com/GNOME/gobject-introspection/blob/main/gir/cairo-1.0.gir.in Eg. the simplest function, `cairo_image_surface_create()` has no parameters annotated: ```     ```...

> Sounds similar to this issue https://gitlab.gnome.org/GNOME/pygobject/-/issues/16, so likely a pygobject issue. However, CairoFontFace does have a record in: https://github.com/GNOME/gobject-introspection/blob/main/gir/cairo-1.0.gir.in Same error when you search, other people (mostly on Ubuntu)...

> > > Sounds similar to this issue https://gitlab.gnome.org/GNOME/pygobject/-/issues/16, so likely a pygobject issue. > > > > > > However, CairoFontFace does have a record in: https://github.com/GNOME/gobject-introspection/blob/main/gir/cairo-1.0.gir.in > >...

I see. Thanks. Okay, I'm binding font-face and scaled-font now.

> I see. Thanks. Okay, I'm binding font-face and scaled-font now. I confirm it works with my MR: https://gitlab.gnome.org/GNOME/pygobject/-/merge_requests/236

> Now, there is still this warning while building HarfBuzz: > > ``` > ../src/hb-cairo.cc:849: Warning: HarfBuzz: hb_cairo_glyphs_from_buffer: argument glyphs: Unresolved type: 'cairo_glyph_t**' > ../src/hb-cairo.cc:849: Warning: HarfBuzz: hb_cairo_glyphs_from_buffer: argument clusters:...

> > Now, there is still this warning while building HarfBuzz: > > ``` > > ../src/hb-cairo.cc:849: Warning: HarfBuzz: hb_cairo_glyphs_from_buffer: argument glyphs: Unresolved type: 'cairo_glyph_t**' > > ../src/hb-cairo.cc:849: Warning: HarfBuzz:...