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

Check font faces markup for objects within groups #6195

Merged
merged 6 commits into from
Mar 4, 2020
Merged

Check font faces markup for objects within groups #6195

merged 6 commits into from
Mar 4, 2020

Conversation

yassilah
Copy link
Contributor

@yassilah yassilah commented Mar 3, 2020

Currently, the "createSVGFontFacesMarkup" is only looking for fontFamilies among objects of the canvas. This PR allows it to check for fontFamilies within (nested) groups.

style,
'\n\t\t@font-face {\n\t\t\tfont-family: \'Plaster\';\n\t\t\tsrc: url(\'path-to-plaster-font-file\');\n\t\t}\n\t\t@font-face {\n\t\t\tfont-family: \'Engagement\';\n\t\t\tsrc: url(\'path-to-engagement-font-file\');\n\t\t}\n'
);
});
Copy link
Member

Choose a reason for hiding this comment

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

i would ask you if you could make up 2 additional font names. We have Plaster and Engagement, used in style and object props. If we had 4 names instead of 2, we could be sure that everyone is captured.

@asturur
Copy link
Member

asturur commented Mar 3, 2020

Looks good to me to merge, if you could update the test i would appreciate.

@asturur
Copy link
Member

asturur commented Mar 4, 2020

great thanks!

@asturur asturur merged commit b85ce8a into fabricjs:master Mar 4, 2020
@asturur asturur mentioned this pull request Mar 12, 2020
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