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

Attempt to load_system_fonts() when loading SVGs #1673

Closed
wants to merge 0 commits into from
Closed

Attempt to load_system_fonts() when loading SVGs #1673

wants to merge 0 commits into from

Conversation

ripytide
Copy link
Contributor

@ripytide ripytide commented Jan 25, 2023

The default usvg::Options skips text elements. This is because it doesn't attempt to load_system_fonts().

This PR may fix #870

Copy link
Member

@hecrj hecrj left a comment

Choose a reason for hiding this comment

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

Is there any overhead from calling load_system_fonts?

may fix #870

Could we get some confirmation?

Also, a cargo fmt is needed!

@ripytide ripytide closed this Mar 11, 2023
@ripytide
Copy link
Contributor Author

Is there any overhead from calling load_system_fonts?

According to the docs it looks in a few predefined system directories to look for available fonts. Not sure if that is classed as too much overhead.

Could we get some confirmation?

It fixed text rendering on my machine. I didn't get time to check using the code given in #870

Closing since you updated the resvg version to 0.29 and the load_system_fonts() function no longer exists, or at least it has been moved according to https://github.com/RazrFalcon/resvg/blob/master/CHANGELOG.md#removed-1

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.

Invisible text in svgs after updating to 0.3.0
2 participants