Description
This was omitted from the initial implementation of compiling gvar, but is a desirable optimization.
I've never written this code, on either the compilation or parsing side, and so it will require a little bit of experimentation. Finding the optimal solution is also complicated, because if two delta sets for a given glyph have a non-shared set of interpolatable points then it will require us to store two copies of the packed point numbers, which may negate the savings from interpolation in some cases.
An optimal solution (but perhaps overkill) would maybe involve computing the possible interpolations for each delta set, determine the total resulting compile size, and then determine if we can reduce compile size by discarding certain interpolatable points in certain delta sets in order to let us reuse a set of point numbers.
A less complicated and also-reasonable solution would be to compute the interpolations for each delta set, and then determine, (per set) whether the compile size of the interpolated deltas + the packed point numbers is less than the deltas for all points.