There seems to be an API incompatibility preventing drop-in replacement with pycairo: Since version 1.15 pycairo uses [TextExtents](https://pycairo.readthedocs.io/en/latest/reference/textextents.html#cairo.TextExtents) (Essentially, a named tuple) for text_extends functions e.g., in [ScaledFont](https://doc.courtbouillon.org/cairocffi/stable/api.html#cairocffi.ScaledFont.text_extents) cairocffi is only returning a tuple.