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

feat(image): support Transformer from SVG #44

Merged
merged 1 commit into from
Feb 27, 2023
Merged

Conversation

liby
Copy link
Collaborator

@liby liby commented Feb 22, 2023

Resolve #43

@vercel
Copy link

vercel bot commented Feb 22, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
image ❌ Failed (Inspect) Feb 27, 2023 at 11:26AM (UTC)

example.mjs Outdated Show resolved Hide resolved
background: Option<String>,
) -> Result<Transformer> {
let mut fontdb = Database::new();
fontdb.load_system_fonts();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we consider providing an API to load only specified fonts in the future? This would improve the speed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good Idea! Welcome to PR~ 🙏


let mut size = tree.size.to_screen_size();
let min_svg_size = 1000;
while size.width() < min_svg_size || size.height() < min_svg_size {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason for this minimum size requirement? I'd prefer if this rendered my SVG at the input resolution

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.

SVG format as input
4 participants