SDL2_ttf bi-directional text

I know how to use TTF_SetFontScriptName() and TTF_SetFontDirection() to render complex scripts and/or bi-directional text, but that requires you to specify explicitly the script and direction you want for a particular string.

What I want to do (and this can’t be an unusual requirement) is to reproduce the functionality of all modern text editors in automatically switching script and direction according to the text being rendered.

This is how, for example, the Uniscribe library in Windows works, or entering text into an edit box created in Javascript, or into Facebook etc. The script and direction don’t have to be specified explicitly, they are determined from the text itself.

But I can’t see how to do this using SDL2_ttf. Am I missing something?

Here is the corresponding issue: Add Bidi support · Issue #135 · libsdl-org/SDL_ttf · GitHub