Skip to content
Adam Twardoch edited this page Oct 25, 2015 · 6 revisions

fontTools Roadmap

This is a wiki page that discusses possible longer-term development goals for the fontTools package. It’s meant as complementary to the issues list. The first draft of ideas was contributed on 2015-10-25 by Adam Twardoch. Discussion and edits welcome.

SFNT tables

Complete SFNT table support

Add read/write/XML support for the currently unsupported Apple-defined tables: morx, kerx, bsln, Zapf, lcar, just, opbd, cvar.

Define OpenType Layout support for GX variations

Currently, there are no formats for GPOS, BASE, GDEF, JSTF which can handle GX variations. Continue working on defining them, implement them and propose for OFF/OpenType standardization (along with the yet-not-standardized Apple-defined tables). Update the GX-related Apple-defined definitions if needed, in cooperation with Apple, to reflect the changes of the last decades.

Define a glyf-like structure for cubic Béziers

The CFF table being not very developer-friendly, devise a format that allows storing cubic Bézier glyph definitions using structures similar to the glyf table. Either propose an extension for the glyf table for standardization or introduce a new glyx table which can handle both cubic and quadratic, or just cubic. Integrate with GX variations.

Font operations

Identify and implement some higher-level consistency

Various values throughout SFNT should be kept in sync. Identify those values and implement a mechanism to modify them in sync. For example, the "PostScript font name" occurs in both the name and the CFF change, and it should be possible to change it only once.

Introduce an ability to "autocalculate"

In theory, various SFNT values can be autocalculated into "best values" based on information already existing in the font. This includes values in head, OS/2, name, bounding boxes and many others.

Subset of defcon API

One way of implementing an API could be to implement a subset of the defcon API that is used with UFO, but for fontTools. For example, the info defcon object provides a reasonable abstraction over various non-glyph-specific font data, including naming. It might be useful to implement it (and possibly a few others) with fontTools, so for a small subset of functionality, defcon UFO access and fontTools access could be done with the same methods.

Simplified API for name table

The name table in particular is one that often gets edited using fontTools, since customizations and renamings are often done as the last step. It would be wonderful to have a more simplified way to do this, especially since the name table is tedious to deal with at the low level. This could be done with the defcon-compatible API.

Glyph set operations

Implement basic glyph editing operations

  1. Ability to remove a glyph (from any or all glyph-defining tables such as glyf, CFF, [CE]BDT, [CE]BLC, sbix, SVG ) and have all affected tables updated.
  2. Ability to add a glyph (including via a pen) into any or all glyph-defining tables, and have all affected tables updated.
  3. Ability to modify a glyph (including via a pen), and have all affected tables updated.
  4. Introduce a method to achieve consistency (glyph adding/removal) in all glyph-defining tables, using a unified method, but also in case one wishes to add/remove a glyph only in one table or in many.

Improve subsetting

Currently, a number of SFNT tables are not handled by subset.py. As a goal, any table that refers to glyphs should be subsettable, and some non-glyph related tables are probably not recalculated properly if the glyph set changes.

Improve merging

Currently, merge.py fails on some fonts, including a few Noto fonts. Merging is conceptually non-trivial, so needs more discussion. Also see:

Refactor subset.py/merge.py

Currently, subset.py is a "one trick pony". It intermixes singular operations such as removing singular glyphs and propagating the changes throughout the font, webfont-specific optimizations and the CLI interface. This (and possibly also merge.py) should be refactored so that things like removing a single glyph are easily done (and possibly propagated upstream to the main lib or a new "operations"-like module), while the operations specific to the task of optimization and subsetting are available separately.

Major transformations

Glyph definition conversions

Implement ability to convert glyph definitions (single-glyph and full-glyph set) between different glyph definition flavors, both those that do not require geometry recalculation (CFF , glyx or Bézier-enhanced glyf, SVG Bézier paths) and those that need approximation into different geometry (CFF to glyf and vice-versa). Also between bitmap definitions in different bitmap flavors (CBDT, sbix, SVG bitmaps).

Layout definition conversions

Implement ability to convert layout definitions between different layout systems: for kerning (TrueType i.e. kern, OpenType Layout i.e. GPOS, AAT i.e. kerx), for more complex positioning (GPOS, kerx) and for substitutions (GSUB, morx). For GSUB-to-morx, possibly use HarfBuzz as an intermediary.