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

Which svg features can twemoji use? #123

Open
12Me21 opened this issue Jan 10, 2025 · 0 comments
Open

Which svg features can twemoji use? #123

12Me21 opened this issue Jan 10, 2025 · 0 comments

Comments

@12Me21
Copy link

12Me21 commented Jan 10, 2025

Twemoji's svg files have historically used a very restricted featureset. (only simple filled <path>s, <circle>s, and <ellipse>s)

However, there aren't any official guidelines on this.
As a result, a few recently added/edited designs have used unexpected features, which is causing problems with software that doesn't support these. (e.g. my pipeline to build a twemoji font has broken several times, due to new designs using difficult features for the first time)

For example:

  • the Hair Pick 🪮 emoji uses strokeed paths, which are not used in any other emoji (Here is an example of this being corrected in the past: 808ed63)

  • Shaking Face 🫨, Maracas 🪇, and Wireless 🛜 use clip-path (and the <defs> and <clipPath> tags) which have never been used previously


Anyway, I've collected statistics on which tags and attributes are used in twemoji, and (with very few exceptions) they are:

<svg> tag:

  • Must be <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36">

<path> tag:

  • d

<circle> tag:

  • cx, cy, r

<ellipse> tag:

  • cx, cy, rx, ry
  • transform - (optional) should only contain rotate(angle cx cy)

<g> tag:

  • (only used for grouping tags of the same color)

All tags:

  • fill - (optional) color #rrggbb or #rgb
  • opacity - (optional)
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

1 participant