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

Support symbol #46

Open
rsheeter opened this issue Jun 8, 2020 · 4 comments
Open

Support symbol #46

rsheeter opened this issue Jun 8, 2020 · 4 comments

Comments

@rsheeter
Copy link
Collaborator

rsheeter commented Jun 8, 2020

Resolve <symbol> when producing a picosvg

@anthrotype
Copy link
Member

anthrotype commented Jun 9, 2020

If I look at our noto-emoji svgs, I see that of the 97 files that contain the <symbol> element, in 96 of them the symbol has no id, so it cannot be xreferenced by a <use> element and thus it's as if it doesn't exist; only 1 svg noto-emoji/svg/emoji_u1f61a.svg has a symbol with an id that is actually <use>d, however it is instantiated with a transform matrix that places it way off the parent svg's viewbox so it does not even render...

Now I wonder if we actually need to bother implementing this, also given that svg-native format does not support <symbol> either, see https://github.com/adobe/svg-native-viewer#supported-features-in-svg-native-in-comparison-to-svg11svg2

No support for inner <svg> or <symbol> elements.

I'm tempted to simply warn and drop them..

anthrotype added a commit to googlefonts/color-fonts that referenced this issue Jun 10, 2020
nanoemoji does not support <symbol> elements yet. Some noto-emoji .svg files contain unused <symbol> elements (without an id attribute), which makes nanoemoji unhappy. I created a branch on noto-emoji repository called 'drop-symbol-elements' and here I am pointing the submodule to that branch.
This unblocks googlefonts/picosvg#46
anthrotype added a commit to googlefonts/color-fonts that referenced this issue Jun 10, 2020
nanoemoji does not support `<symbol>` elements yet. googlefonts/picosvg#46

Some noto-emoji .svg files contain unused `<symbol>` elements (without an `id` attribute), which make nanoemoji unhappy. I created a branch on noto-emoji repository called 'drop-symbol-elements' and here I am pointing our submodule to that branch.

We shall use noto-emoji master branch once that patch will be merged upstream.ymbol-elements' branch
@rsheeter
Copy link
Collaborator Author

This may have been an issue with old svg export; I see less symbol fails in the latest noto-emoji (googlefonts/color-fonts#10 (comment)). If we're lucky the ones that are left simply need to be re-exported :)

@rsheeter
Copy link
Collaborator Author

I guess regardless removing anonymous (or if we feel fancy, unreferenced) symbols seems safe

@rsheeter
Copy link
Collaborator Author

I'm now seeing cases where we get Symbols that appear to actually be used in Adobe Illustrator exported svgs so we may need to implement this.

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

No branches or pull requests

2 participants