afdko
afdko copied to clipboard
[spot] alternate metrics ignored in class kern proof
We found that some kerning pairs in CJK fonts were printed with no palt applied when generating a PostScript proof with $ spot -P palt,kern font.otf.
- Steps to reproduce
- Grab IBMPlexSansJP-Regular.otf, which comes with class-based kana kerning pairs along with palt/vpal.
- Generate a PostScript proof by running
$ spot -P palt,kern IBMPlexSansJP-Regular.otf > IBMPlexSansJP-Regular.ps. - Go to p.64 and look for
ぐ(CID+857) and。(CID+635) pair.
- Expected result
- For the pair
ぐ。, the alternate metrics for both of the characters should be applied.
- For the pair
- Actual result
- For the pair
ぐ。, the alternate metrics for both of the characters are not applied.
- For the pair
See the following screenshots for better illustration:
| Expected | Actual |
|---|---|
For reference, the following is the result obtained with hb-shape:
$ hb-shape --features='palt,kern' IBMPlexSansJP-Regular.otf 'ぐ。'
[gid857=0@-105,0+785|gid635=1+500]
Applying a patch like this to c/spot/source/GPOS.c should fix this issue, so my speculation is that the code for handling palt is somehow missing for class kerning.