py-staticmaps icon indicating copy to clipboard operation
py-staticmaps copied to clipboard

Fix attribution text width (and font size) calculation [Cairo]

Open blakebjorn opened this issue 2 years ago • 1 comments

text_extents(attribution)[3] refers to line height, not line width, e.g. cairo.TextExtents(x_bearing=0.0, y_bearing=-18.0, width=252.0, height=27.0, x_advance=252.0, y_advance=0.0)

changed [3] to .width, though [2] would do the same

blakebjorn avatar Dec 07 '22 18:12 blakebjorn

Seems reasonable, see pycairo documentation.

lowtower avatar Dec 08 '22 07:12 lowtower