This is interesting to me, but I am very naive about this. Can you explain, or point to where I could learn more?

I'd start with HarfBuzz: https://github.com/harfbuzz/harfbuzz

That's the open source font shaping engine. It does a lot of work to handle font shaping and rendering for languages that can't really be reduced to characters.