One quick suggestion is to view one of the examples that is included in the quickstart module as part of the Communicator package. To view this example:
Start the server by double-clicking start_server.bat found in HOOPS_Communicator_202Xxx\quick_start
The source code (.js, .ts) can be found in the directory HOOPS_Communicator_202Xx\web_viewer\examples\js\text_insertion
This particular example create a canvas element for the text. Out of the box, you will likely need to make changes to ctx.font to handle boldface font as well as modify ctx.fillText to handle multiline text (please see createTextCanvas(textSettings)).