The following programs of LearnOpenGl are implemented in javascript / typescript, using WebGl2. Not all browsers support WebGl2. The latest versions of Google Chrome and Windows Edge can be used to view the results.
Chapter 48 of the book that accompanies the site LearnOpenGl is about text. The C++ program accompanying the book uses the FreeType library to produce bitmaps and metrics for letters. When using programs in the html context many other options are available.
font 3D Using Earcut to triangulate font shapes