Skip to content

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

Open
blakebjorn wants to merge 1 commit into
flopp:masterfrom
blakebjorn:master
Open

Fix attribution text width (and font size) calculation [Cairo]#29
blakebjorn wants to merge 1 commit into
flopp:masterfrom
blakebjorn:master

Conversation

@blakebjorn

Copy link
Copy Markdown

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

@lowtower

lowtower commented Dec 8, 2022

Copy link
Copy Markdown
Contributor

Seems reasonable, see pycairo documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants