-
Notifications
You must be signed in to change notification settings - Fork 216
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
Build COLR TTFs with nanoemoji #260
Conversation
This is done via the container at https://gitlab.com/mavit/nanoemoji-container. For me, the resulting COLR TTFs work in Firefox and in the Gnome desktop on Fedora 32 (although they display rather small). Caveats: - It may be premature to replace `scfbuild` for SVG builds. If we decide to go ahead without `scfbuild`, then we’ll want to remove the remaining files related to it. If we decide to keep `scfbuild`, then we’ll want to revert those parts of this patch. In either case we’ll want to update the readme to link to the new outputs. - I’ve tested this with Podman, not Docker. Relates to hfg-gmuend#93.
Unlike Podman, Docker only supports SELinux relabelling with --volume, not --mount.
This is now possible because googlefonts/nanoemoji#114 was fixed.
Some of them still overspill slightly. Perhaps scaling by 1.3 is a bit too much?
This yields TTFs of about a quarter of the size of those generated by scfbuild.
Any feedback? |
This is super cool! I think @b-g would be responsible for testing this with the other fonts. In the meantime, could you attach some screenshots? Thanks so much! |
I took the 1.3 scaling factor from d66343e, although I think it looks a little cramped and would be tempted to go for something smaller. |
Dear @mavit! This is mega! My apologies for the very long radio silence over the summer ... but I needed a break with the OpenMoji project :) I totally would love to swap I've tried to build the fonts with Could you check bene@zwei-207 openmoji % npm run generate-font
> [email protected] generate-font /Users/bene/Documents/openmoji
> ./helpers/generate-fonts.sh
👉 generate-font-css.js
master: Pulling from mavit/nanoemoji-container
c7def56d621e: Pull complete
f2931b91d78b: Pull complete
f6b4b8ceb868: Pull complete
Digest: sha256:77b71ae860417e531c72870d17128e878b87a8989479e7010073e607d04a937c
Status: Downloaded newer image for registry.gitlab.com/mavit/nanoemoji-container:master
registry.gitlab.com/mavit/nanoemoji-container:master
./helpers/generate-fonts.sh: line 39: OpenMoji-${saturation^}: bad substitution
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] generate-font: `./helpers/generate-fonts.sh`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] generate-font script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/bene/.npm/_logs/2020-10-15T07_18_22_557Z-debug.log |
This makes quoting more obvious and straightforward, but also ensures that variable substitutions are done inside the container, so we know the Bash version is recent enough to support the `${var^}` feature.
I'm guessing you're using MacOS, here, because it turns out that that has an ancient version of |
you should shellcheck your bash scripts, it's helpful for catching stuff like this :) |
This is good advice, but I do, and it doesn't help here: ShellCheck knows that |
Yes I'm on macOS, using zsh (note: 10.15 Cataline replaced bash with zsh).
Still the same error. Yes would be great to move as much as possible inside a fully controlled docker image. |
Sorry, I overlooked a second place where this syntax was used. Please try it again. |
Thanks for testing again. The latest news from the nanoemoji project is that they think they now have SVG fonts built with their lossy picosvg compression working in Adobe apps and Safari. Lets wait for them to release a version that includes these improvements, then we can try again. |
Okay, there's another SVG TTF built with nanoemoji 0.8.1 at I think we might be nearly there. 🤞 |
Ah, that's good to hear. In that case, could you re-test https:/hfg-gmuend/openmoji/blob/b4972b4ca68637a7899d1539bccfc7d97ec2eede/font/untouchedsvgz/OpenMoji-Color.SVG.ttf?raw=true
Does Safari do the same thing? It sounds like this could have the same cause as googlefonts/nanoemoji#276. |
the re-test shows exactly the same result in textedit. safari and chrome don't display any openmoji at all : / |
SVG TTFs build with nanoemoji are getting better, but are still not quite there yet. hfg-gmuend#260 (comment)
In that case, let's stick with using scfbuild for making SVG fonts for use on macOS. We can still use nanoemoji for black and white fonts and COLR/CPAL fonts. |
@b-g and @carlinmack I have tested @mavit's COLR font on Edge on Linux and it worked: Cc: @jmontane |
It also worked on VSCode editor and integral terminal, using COLR font. The flags used to not work on integrated terminal in reference to microsoft/vscode#69900. |
SVG TTFs build with nanoemoji are getting better, but are still not quite there yet. hfg-gmuend#260 (comment)
Here's a COLRv0 OpenMoji Font updated to Emoji 14.0 Built using NanoEmoji. It's far from perfect, but may be useful to those who want a functioning color webfont to use right now. |
Hi @RobertWinslow, many thanks for this! Did quickly check the browser test page ... looks quite good on macOS (Firefox, Safari and Chrome)! @dnlutz could you please double check the font in Adobe CC and Glyphs, too?
|
SVG TTFs build with nanoemoji are getting better, but are still not quite there yet. hfg-gmuend#260 (comment)
SVG TTFs build with nanoemoji are getting better, but are still not quite there yet. hfg-gmuend#260 (comment)
Closing in favour of #422. |
Sorry that it took some time but now i also checked you font files: MacOS 12.6 / Adobe Illustrator OpenMoji-black-glyf.ttf OpenMoji-color-picosvgz.ttf OpenMoji-color-untouchedsvgz.ttf |
SVG TTFs build with nanoemoji are getting better, but are still not quite there yet. hfg-gmuend#260 (comment)
This is done via the container at https://gitlab.com/mavit/nanoemoji-container.
For me, the resulting COLR TTFs work in Firefox and in the Gnome desktop on Fedora 32
(although they display rather small).Caveats:
scfbuild
for SVG builds. If we decide to go ahead withoutscfbuild
, then we’ll want to remove the remaining files related to it. If we decide to keepscfbuild
, then we’ll want to revert those parts of this patch. In either case we’ll want to update the readme to link to the new outputs.Relates to #93.