otfstemhist results not useable if no processed layer exists
When running psstemhist on a UFO with overlapping contours in the default layer and no processed layer present, the results created are not useful – see attached text files for comparison.
Proposal:
- Option 1: alert the user if no processed layer exists and quit
- Option 2: create the processed layer on the fly, and run psstemhist on that data. Ideally this would happen with a dummy UFO file which is discarded afterwards.
I would personally prefer option 2, but can understand if that’s too much overhead.
We should decide how this should work. Since otfautohint can now hint glyphs with overlap we can probably just run that algorithm and then the stemhist stuff and there would be no need to store the data temporarily in the filesystem.
I think this is basically fixed. By default, when hinting a VF we process the glyphs to remove overlap, use that glyph to extract candidate stems, and then back-map those stems to the original glyph. We don't do that by default with static instances, including UFOs, but otfautohint has the option to force that processing.
The same option exists in otfstemhist. So if you just force overlap processing in this scenario you should get what you want.