Forum Feature requests

Plans for modernized OpenType font format support?

twardoch
In March 2015, the OpenType font format specification version 1.7 was released. This was a major extension of the spec, which added support for the “MATH” table for mathematical typesetting, as well as support for three storage formats for multi-color glyphs: “COLR/CPAL” which combines pre-existing monochrome outline glyphs into multi-color glyphs, “CBDT/CBLC”, which uses PNG bitmaps to store multi-color glyph images, and “SVG”, which stores multi-color glyphs as a mixture of complex vector graphics (with gradients, strokes and transparencies) as well as bitmaps.

Throughout 2016, a working group consisting of five large companies (Apple, Adobe, Google, Microsoft and Monotype) and a few invited experts worked on another major extension to the standardized font format: OpenType Font Variations. In September 2016, the results were presented at the ATypI Warsaw conference: OpenType version 1.8 added support for variable glyphs and metrics via the “gvar” table, backwards-compatible to the TrueType GX Variations extension which was introduced in 1993 by Apple but never gained any traction, and the “CFF2” table, which provides a similar mechanism for PostScript-flavored fonts and replaces the previous “CFF” table. The “sbix” table was also added, which uses PNG bitmaps for multi-color glyphs, much like the “CBDT” table.

So today, we have 4 OpenType font flavors with multi-color glyphs (some of them being supported in HTML browsers). For variable fonts, we have proposed CSS4 syntax, support in Chrome, Firefox and WebKit, and alpha fonts.

Does Prince have any timeframe for adding support for any of these new aspects of OpenType?
mikeday
The diligence of font developers in creating extra labour for us knows no bounds! Two different variation formats, four different emoji formats, all on top of the existing two different outline formats, two different WOFF formats, and three different typesetting feature formats. It is truly a blessing that I have devoted my life to the seemingly simple task of getting glyphs on paper. :D

We do plan to implement these features, although it will take time, and our schedule also depends upon the needs and priorities of our customers.
twardoch
Mike,

it masy be of interest to you that fontkit, a modern an extensive OpenType font parser and layout engine work in JS has just received a comprehensive upgrade with a full Indic shaper that is a port of the spec-compliant Harfbuzz shaper:
https://github.com/devongovett/fontkit/pull/99

Perhaps Prince could make use of fontkit (if it's more convenient than using Harfbuzz) via JS so that you could do full OpenType Layout rendering for all Indic scripts. Note that fontkit also supports AAT features and variable OprnType fonts.
mikeday
Nice, I'll take a look! If nothing else it may encourage us to lift our game. :D
twardoch
Here's a demo of fontkit rendering variable fonts with features into HTML canvas:

https://fontkit-demo.now.sh/
https://github.com/devongovett/fontkit-demo
twardoch
BTW, as of now, LuaTeX is the only automated solution that supports these new things in long PDF creation (there is https://github.com/devongovett/pdfkit by the fontkit author but that's only good for PDFs that are composed like graphics rather than typeset).

Prince is unique because it supports OpenType Layout features and custom fonts well. With support for variable fonts, it might get ahead of the game not only with Antenna House but also traditional GUI document creation tools like InDesign, for whom adding support for variable fonts will be difficult.