Font shaping rules are actually turing complete. An incredible amount of engineering effort has gone into this not being a total disaster everywhere at all times.