adobe-type-tools / afdko

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

[otfstemhist] cannot specify glyphs with dashes in name #1698

Closed frankrolf closed 1 year ago

frankrolf commented 1 year ago

I have a Thai font for which I’d like to analyze stem information. The Thai glyph names look like this:

koKai-thai
khoKhai-thai
khoKhuat-thai
khoKhwai-thai
khoKhon-thai
khoRakhang-thai

etc.

When running otfstemhist -g koKai-thai,khoKhai-thai my_font.ufo, I get

WARNING: glyph ID <koKai> in range koKai-thai from glyph selection list option is not in font. <xxx Thai Traditional-Regular>.
WARNING: glyph ID <khoKhai> in range khoKhai-thai from glyph selection list option is not in font. <xxx Thai Traditional-Regular>.
ERROR: Selected glyph list is empty for font <xxx Traditional-Regular>.

I assume this is because the dashed glyph names coincide with otfstemhist’s glyph range parsing. Not blaming otfstemhist, the same bug exists in psstemhist.

skef commented 1 year ago

Apparently forgot to reference this in #1703 , but it's fixed (we check for a glyph with the hyphen in the name first).

madig commented 9 months ago

Installing afdko from the develop branch, I still get the same bug when trying to use otfautohint's -g or -x switches on OTFs (-g works for UFOs for some reason). Should this have been fixed as well?

skef commented 9 months ago

@madig -- did you confirm that the font file you're hinting retained the glyph names in the post table? They're often omitted.

madig commented 9 months ago

Oh duh, of course. Sorry for the noise.