Hi, today I found one bug in kerning when I’ve testing font on fontgauntlet and fontdrop.
Some glyphs in my font encoded in PUA BMP range, and it has a kerning pairs with default cyrillic letters and PUA encoded glyphs. Kerning in this pairs looks good in Adobe programms, but if I copy sample text from Glyphs app or TextEdit without formatting to the testing web page - kerning in these pair breaks out.
So here I saw interesting thing, if these same PUA encoded glyphs activated with opentype feature (LOCL or Stylistic set) then kerning pairs enabled and looks good as it should be.
May you know CSS trick to fix this issue?
I believe this is because OpenType features (including kerning) cannot span across scripts and PUA is treated as its own script separate from Cyrillic. So this works as designed. Adobe performing its own interpretation of how OpenType features should be applied would not shock me.
The reason why it works when using the
locl feature is because the script segmentation step already happened at the feature application stage of the text shaping process. This is one of the reasons why it’s generally best to avoid PUA coding and use features instead.
Some implementations will classify PUA as there own script, others will merge them with the surrounding script (Firefox does that, for instance). It might be a good idea to report this on Chrome issue tracker.