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

add glyph-name attributes to svg-font glyph tags #227

Open
AlexxBoo opened this issue Sep 17, 2020 · 2 comments
Open

add glyph-name attributes to svg-font glyph tags #227

AlexxBoo opened this issue Sep 17, 2020 · 2 comments

Comments

@AlexxBoo
Copy link

Hi there,
It would be really great, if the svg font (\font\weathericons-regular-webfont.svg) could be generated with included glyph-name attributes (see: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/glyph-name). There are applications that implement icon selection solely with the svg font and their respective attributes.
Would this be possible?

@fox91
Copy link
Collaborator

fox91 commented Sep 20, 2020

Hi @AlexxBoo,
following the link you posted there is this disclaimer in the very first part of the page:

Deprecated since SVG 2
This feature is no longer recommended...

so it appears that in browsers this is no longer supported.

Can you give some examples of applications that allow its use (and in which there are no other methods, perhaps supported, usable)?

@AlexxBoo
Copy link
Author

Hi @fox91,

Thanks for pointing that out. I'm aware of the deprecated warning for the glyph-name attribute. But the <glyph> tag itself, that is used for the SVG font elements, is deprecated as well. However, the warning is for SVG version 2 and up, and this project declares v1.1 for the SVG font, for which the usage of the attribute seems perfectly fine.

I stumbled upon the issue while trying to add custom icons to my HomeAssistant installation. The respective plugin relies on the glyph-name attributes in the SVG font to identify the icons by name. Also e.g. the Fontello service produces web-fonts containing SVG versions with this attribute.

Only when at one time upgrading the SVG font to a newer version, finding an alternative for the <glyph> tag (and the glyp-name attribute respectively) would need concideration. Attempts seem to go towards WOFF anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants