Re: CFF table processing for WOFF2?

Behdad,

You wrote:

> That's definitely something to consider. From our experiments, subroutines save something in the ballpark of 15% to 20%.  It's far less than what I expected when I saw the numbers.

I have subroutinized thousands of large (aka East Asian) fonts over the past 15+ years, and have become fairly good at predicting the amount of savings based on several factors, along with how long the actual process can take.

Anyway, to reach the 15 to 20% threshold, the design needs to have a good degree of regularity. The Kozuka families, along with Source Han Sans / Noto San CJK, employ an Element Library in their design process, which provides such regularity. For fonts that were designed using more conventional approaches, the savings sometimes may be in the 5 to 10% range. And, the more complex the design, the less savings.

For both Kozuka families, the ExtraLight weight has the greatest savings, upwards of 35%. For Source Han Sans / Noto San CJK, it is closer to 20%, but still the greatest savings among all seven weights. This is no doubt due to the least amount of component intersections.

Lastly, Korean hangul glyphs tend to subroutinize the best, with close to 50% savings, due to the inherent regularity of their structure combined with a very large number of glyphs.

> I'll experiment with this some time.
>  
> Another saving point, which doesn't need any format change, is to remove the encoding vector, since it's unused in OpenType fonts (cmap is used instead).
> 
> Will keep the WG posted as I experiment.

It is very easy to create sets of subroutinized and unsubroutinized CFFs with which to experiment. First, pluck the 'CFF ' table from one of the (subroutinized) Noto Sans CJK fonts to get the former one. Then use "% tx -t1 CFF cidfont.ps ; tx -cff cidfont.ps CFF.unsub" to create the latter one.

Regards...

-- Ken

Received on Thursday, 23 April 2015 12:43:46 UTC