The issues of fonts, font-layout, Harfbuzz, ICU and whatnot is all well described by Behdad Esfahbod here:
Since 2013, XeTeX has had HarfBuzz and Graphite2 and Core Text rendering engines built into it, thanks to the fine work of Khaled Hosny.

Best,
Dominik