adobe-type-tools / afdko

Adobe Font Development Kit for OpenType
https://adobe-type-tools.github.io/afdko/
Other
1.06k stars 167 forks source link

[otfstemhist] -h reports unrelated options, wrong tool name #1701

Closed frankrolf closed 1 year ago

frankrolf commented 1 year ago

otfstemhist -h presumably shares some help content with otfautohint. The -g example needs to be reworked:

  -g GLYPH_LIST, --glyphs GLYPH_LIST
                        comma-separated sequence of glyphs to report
                        The glyph identifiers may be glyph indexes, glyph names, or glyph CIDs.
                        CID values must be prefixed with a forward slash.
                        Examples:
                            otfautohint -g A,B,C,69 MyFont.ufo
                            otfautohint -g /103,/434,68 MyCIDFont

(should be otfstemhist instead of otfautohint)

Some options seem to be applicable to otfautohint only:

  -m GLYPH_LIST, --overlap-glyphs GLYPH_LIST
                        comma-separated sequence of glyphs to be corrected for overlap
                        Same convention as --glyphs flag

  --overlaps-file PATH  file containing a list of glyphs to be corrected for overlap
                        The file must contain a comma-separated sequence of glyph identifiers.

  --force-overlap       Correct for potential overlap on all glyphs (the default when using -r or
                        hinting a variable font and not supplying an overlap list)

  --force-no-overlap    Do not correct for potential overlap on any glyphs (the default when
                        hinting individual, non-variable fonts and not supplying an overlap list)
skef commented 1 year ago

When a glyph path has overlap one will typically need to process the path to remove it before one can get accurate stem information from it. Otherwise the independent outlines will appear as "pseudo-stems" to the processor. There isn't much difference between the stemhist case and the autohint case when it comes to overlap -- that's why those arguments are available in both cases.