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

Fix custom font-family's not loaded on text nodes #1724

Closed
wants to merge 1 commit into from

Conversation

maximgeerinck
Copy link

Summary

Looks for text nodes in an SVG and adds the font-family attribute whenever a font-family was added. This will make sure that custom fonts load properly on svg elements.

This PR fixes/implements the following bugs/features

Solves the issues listed above

Test plan (required)
Add a custom font with @font-face, use the custom font in a css class and add the class to a svg text element

Code formatting

Please make sure that code adheres to the project code formatting. Running npm run format will automatically format your code correctly.

Closing issues

closes #1463, #1709

@bogdan-matsiakh
Copy link

@niklasvh, will you merge this PR?

@kidar2
Copy link

kidar2 commented Dec 9, 2019

When it will be merged?

@IAmRC1
Copy link

IAmRC1 commented May 11, 2020

I cloned the repo and can't find this file NodeContainer.js under src directory, can you help?

@nidi3
Copy link

nidi3 commented Jul 21, 2020

@IAmRC1 It's in svg-element-container.ts

@nidi3
Copy link

nidi3 commented Jul 21, 2020

I released this together with #2132 as "@nidi/html2canvas": "1.0.0-rc.12"

@goliney
Copy link

goliney commented Dec 3, 2020

@nidi3 the @nidi/html2canvas package doesn't solve the problem, unfortunately:
image
https://jsfiddle.net/s8utLnbh/

@MwumLi
Copy link

MwumLi commented Aug 16, 2021

@goliney Is there a follow-up?

@goliney
Copy link

goliney commented Aug 16, 2021

@MwumLi unfortunately no

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.

Custom font on SVG element is not correct
7 participants