Thank you JagerDesu, I've finally got time to test emscripten out. I didn't delve too deep yet, but here's what I've experienced so far.
It was not too difficult to set it up; download the source file from github, follow instructions to install and update. Then I found the test files in emsdk/upstream/emscripten/test, and it already has SDL/SDL2/ttf/image/mixer/gfx code examples.
I still don't have a webhost, so I can't test out preloading files yet and I'm compiling to a single file for the same reason. SDL libs are downloaded automatically the first time I test a library, and that is downloaded to a cache folder inside the git project folders, so it doesn't need to re-download after that.
I compiled the sdl2_ttf.c file after learning about adding a resource folder "res" with my chosen font inside into that single file.
em++ sdl2_ttf.c -s USE_SDL=2 -s USE_SDL_TTF=2 -s SINGLE_FILE --embed-file res -o build/hello.html
The resulting html file is 3.2Mb, so a bit on the large size compared to 18Kb compiled by g++, but I understand that all of the SDL libraries used are also built into this file, probably also with the standard C/C++ template libs and more. Worth it so far for a build once run anywhere capability.
I compiled this on a linux machine, then tested the result on a 10 year old computer without SDL installed, and it ran just fine, so yes, it is properly packaged and sand-boxed.
The documentation is excellent; presented as a step-by-step tutorial which is easy to read compared to some other docs https://emscripten.org/docs/introducing_emscripten/index.html
I'm going to have to stress test things to try and figure out the limits to this system, but I'm already very impressed on day 1.
Edit: Moved from lounge to general C++ forum.