#text(tracking:1em) does not work correctly: is it feature or bug?

I found that when typing Japanese, the tracking argument of text function does not work correctly.

Example:

The code for this export is here: japanese-spacing

What happening here is that the tracking is not working between different type of characters: Kanji, Hiragana, and Katakana.

I have two questions:

  1. Is it feature or bug?
  2. If it IS bug, is there any way to avoid this?

Something strange is going on with using regex too:

#show regex("[\\p{Hiragana}\\p{Katakana}\\p{Han}]+"): it => box(stroke: 1pt, it)
あのイーハトーヴォのすきとおった風、夏でも底に冷たさをもつ青いそら、うつくしい森で飾られたモリーオ市、郊外のぎらぎらひかる草の波。

image

Which can explain why this doesn’t work perfectly:

#show regex("[\\p{Hiragana}\\p{Katakana}\\p{Han}]+"): it => it.text.clusters().join(h(1em))

あのイーハトーヴォのすきとおった風、夏でも底に冷たさをもつ青いそら、うつくしい森で飾られたモリーオ市、郊外のぎらぎらひかる草の波。

image

I thought that something like this could work:

#set text(tracking: 1em)
#show regex("\\p{Hiragana}\\p{Katakana}"): it => it.text.clusters().join(sym.zws)

#set text(tracking: 1em)
#show regex("[\\p{Hiragana}\\p{Katakana}\\p{Han}]+"): it => it.text.clusters().join(h(1em))