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

Trying to create a custom Emoji font #177

Open
lostcarpark opened this issue Aug 29, 2024 · 1 comment
Open

Trying to create a custom Emoji font #177

lostcarpark opened this issue Aug 29, 2024 · 1 comment

Comments

@lostcarpark
Copy link

I'm trying to create a custom Emoji font for use on a website.

The font contains SVG colour glyphs imported from Inkscape, and monochrome fallbacks.

So far I have been unable to get the colour glyphs to be displayed in any application, but I'm mainly interested in getting it working in web browsers.

Here is the result I'm getting in Firefox on Linux (but the results are very similar across most operating systems and browsers):

image

I'm including the font with the following CSS:

      @font-face {
        font-family: "Lego Emojis";
        src: url(Lego_emojis.otf);
      }
      p {
        font-family: "Lego Emojis";
        font-size: 2rem;
      } 

On the first line, the monochrome emojis are getting used. The second emoji is not in the font, so the browser default is used.

On the second line, I have directly embedded the SVG in the HTML, which displays the correct image, but does cause the file size to grow quickly!

So I can think of three possible causes:

  1. I'm generating the font files incorrectly.
  2. I'm defining the font incorrectly in my CSS.
  3. Browsers don't support this.

Any advice greatly appreciated.

I'm using Birdfont 6.7.1.

@johanmattssonm
Copy link
Owner

johanmattssonm commented Aug 29, 2024 via email

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