1

The Open Type font format standard 1.7 officially supports three types of colored glyphs, as required for emojis. As of late 2016, version 1.8 has added support for another variant. Platform support varies:

The SVG table explicitly considers animation – using CSS, JS, SMIL or embedded files – but I’m not sure that has been implemented anywhere yet:

Glyph Rendering

The SVG glyph descriptions may be rendered statically or with animation enabled.

Does any of the PNG-based implementations support animation using APNG? How about tools?

Compressed Color Bitmaps

Images for each individual glyph are stored as straight PNG data. Only the following chunks are allowed in such PNG data: IHDR, PLTE, tRNS, sRGB, IDAT, and IEND. If other chunks are present, the behavior is undefined.

JFTR, APNG relies on three additional chunks which both OS X / macOS and iOS natively support:

  • acTL Animation Control
  • fcTL Frame Control
  • fdAT Frame Data

So, if I’m not mistaken, APNGs should work in sbix verbatim, but not in CBDT.

Crissov
  • 947
  • 11
  • 16
  • 1
    The SVG table approach is certainly live already, although (like all significant OpenType updates) it's a lot of work. Firefox has the widest support at the moment - see the https://pixelambacht.nl/lapislegit font, for nstance. – Mike 'Pomax' Kamermans Oct 14 '16 at 00:10

1 Answers1

1

APNG seems to be supported in Firefox and Safari only, so that'll be the same when used as font glyphs.

I figure you already considered this, but if GIF suffices, your best bet would be OpenType SVG. It has the widest support, and you can embed bitmap images in the SVG: see glyph 0050 in this test font.

Regarding non-bitmap animations in OpenType SVG, unfortunately you can't use JavaScript animations, and with SMIL on the way out you're stuck with CSS animations... which don't currently work in Firefox and Edge

RoelN
  • 2,181
  • 13
  • 15
  • 1
    I did not seriously consider GIFinSVGinOTF (nor PNGinSVGinOTF). As far as I know, only Firefox currently supports SVGinOTF fully. Other platforms only support basic monochrome outlines, if anything. Opera did support APNG before the switch to Blink, which has a [working patch](https://bugs.chromium.org/p/chromium/issues/detail?id=437662) still awaiting approval so it may be coming back to Opera and finally arrive in Chrome “soon” (if there wasn’t politics favoring WebM/P). – Crissov Sep 01 '16 at 03:35
  • Windows 10 just recently added support as well, so OpenType SVG works in Edge. And I hope Chrome is to follow soon! – RoelN Sep 01 '16 at 06:22
  • @RoelN Chrome has an open meta issue for color font support here: https://bugs.chromium.org/p/chromium/issues/detail?id=703332 – Joël Mar 29 '17 at 16:58