behdad/fonttools — pull request #191 by anthrotype (2014-10-14 14:35:09+00:00)
Title: [subset] added option to prune unused ulUnicodeRanges bits

after @roozbehp suggestion, I rewrote this thing once again.

The subset option "--recalc-unicode-ranges" (default is False) now only works in "negative": that is, it prunes (turn OFF) all the ulUnicodeRange bits which are no longer needed, as no intersection is found between the ranges and the code points that are left in the font after subsetting. It does *not* also turn the bits ON in case there's any intersection, like I did before.

This approach seems more sensible, as there isn't universal agreement on when those bits should be set on. In the specs the determination of "functional" unicode ranges is left to the font designer.

I kept the unicode ranges data from the specs inside the OS/2 table module, as it may also be recycled in other scripts.

Let me know what you think about it.
Thank you,

Cosimo