From ad0c4dd05ce2947495417364f3db60d13bde0c1a Mon Sep 17 00:00:00 2001 From: Blake Anderson Date: Wed, 7 Dec 2022 13:42:11 -0500 Subject: [PATCH] Update cairo_renderer.py --- staticmaps/cairo_renderer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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