Can't you just link HarfBuzz for that?
Harfbuzz partly comes from Qt's codebase IIRC
Re:CXX-Qt: Safe Rust bindings for Qt
by mwcampbell on Wednesday March 02, 2022 @01:35PM
(#30530970)
harfbuzz is for text rendering, not editing. Of course, the former is a prerequisite for the latter, but text editing has plenty of its own complexity.
It's quite possible to make a good GUI, just lots of mundane small issues to deal with, and it's overall a massive undertaking. It requires at least an extremely good knowledge of how different languages deal with text and input it.