Ultimately it would probably feel quite unnatural compared to the native text selection of the browser. And probably would not work very well except in a small subset of browsers.
I think at some point in the future browsers and/or operating systems will ship with machine learning powered systems for recognizing text in bitmaps and for letting users copy recognized text. This is already possible today both with third party non-ML powered OCR software and with third party ML-powered software.
Is this a more likely approach than just drawing the selection highlight and emulating the whole thing in canvas?
This library uses a prebaked SDF texture.
https://github.com/wwwtyro/candygraph/blob/master/src/assets...
> On top of that, how does that interact with the browser? Can the browser still select the font (size) of the rendered text? Can the user select it for copying?
No.