Handling Dynamic Text Rendering

So im creating an engine with monogame for general use. It will come with specific menus rendered by the game itself to select script packages that users can create and run. The problem is that the menu needs to read from the windows filesystem to gather all of the files in the directory but I do not know how to deal with fonts and supporting other languages outside of english.

Currently I use my own bitmap font that I made in Photoshop but obviously it would be a real pain to have to create these for several other languages so I’m looking to compromise the superior quality in order to support unicode characters. My main issue is that the SpriteFont system is really hard to work with on a dynamic level. Not only do I have to support text on the menus but also giving the users the ability to draw text from the script. So unless I include the entire pipeline tool it doesn’t seem like I have very many options for text rendering. I can’t use any windows specific libs (like DirectWrite which is what I use in a C++ engine) because I still need this engine to work on multiple platforms.

So my question is, are there any good methods to handling dynamic text rendering without having to rely on external files? I want to be able to do things like change the font size (without scaling), bold, underline etc… without the spritefont xmls.

Now if the xmls are required, is there a way to create them realtime and use them from within the engine itself? I would be satisfied with that alone.

You could use a library such as TrueTypeSharp that loads a TTF file and generates a greyscale bitmap from supplied text. This bitmap can then be put into a texture using Texture2D.SetData(). For efficiency, only do this when the text changes and keep the texture for the subsequent frames for as long as that piece of text is required.

Thank you, I will definitely check this out.