diff --git a/staticmaps/cairo_renderer.py b/staticmaps/cairo_renderer.py index d27d151..37f98e9 100644 --- a/staticmaps/cairo_renderer.py +++ b/staticmaps/cairo_renderer.py @@ -150,7 +150,7 @@ def render_attribution(self, attribution: typing.Optional[str]) -> None: while True: self._context.set_font_size(font_size) _, f_descent, f_height, _, _ = self._context.font_extents() - t_width = self._context.text_extents(attribution)[3] + t_width = self._context.text_extents(attribution).width if t_width < width - 4: break font_size = font_size - 0.25