Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include new cairo renderer #48

Merged
merged 2 commits into from
Nov 19, 2024
Merged

Include new cairo renderer #48

merged 2 commits into from
Nov 19, 2024

Conversation

27justin
Copy link
Contributor

Hello,

this PR adds a simple cairo renderer as well as a corresponding example to clay, this allows rendering directly into PNGs, PDFs, etc.
I've got it to a point where I believe it to be 'good enough' for now, it notably does not include a proper text shaping engine, instead relying on cairo's toy text API to measure text, etc.
This is flaky for some fonts, though I tweaked it that the result is acceptable for most fonts I tested it against.

Here's a preview of the PDF the example emits:
output.pdf

@nicbarker
Copy link
Owner

Thanks for all the awesome work here 🎉 just taking a look now!

@nicbarker nicbarker merged commit 330e56a into nicbarker:main Nov 19, 2024
3 checks passed
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