Skip to content

feat(image): support Transformer from SVG#44

Merged
Brooooooklyn merged 1 commit intomainfrom
feature/support-svg
Feb 27, 2023
Merged

feat(image): support Transformer from SVG#44
Brooooooklyn merged 1 commit intomainfrom
feature/support-svg

Conversation

@liby
Copy link
Copy Markdown
Collaborator

@liby liby commented Feb 22, 2023

Resolve #43

@vercel
Copy link
Copy Markdown

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)

@liby liby force-pushed the feature/support-svg branch from ffaeb61 to 1a28612 Compare February 27, 2023 11:23
@liby liby force-pushed the feature/support-svg branch from 1a28612 to ec156eb Compare February 27, 2023 11:24
@Brooooooklyn Brooooooklyn merged commit 21a50aa into main Feb 27, 2023
@Brooooooklyn Brooooooklyn deleted the feature/support-svg branch February 27, 2023 11:56
background: Option<String>,
) -> Result<Transformer> {
let mut fontdb = Database::new();
fontdb.load_system_fonts();
Copy link
Copy Markdown

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
Copy Markdown
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 {
Copy link
Copy Markdown

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