Scripting - add block behind each letter in 3d text?

I’d like to achieve something like what I have below, but automated by a script:

The idea is that each character in a block of 3d text would have a box mesh placed behind it like so, basically leaving very little room on the sides, and clearly a bit more on top and bottom.

I’m hopeful someone has some existing code I can adapt or some ideas. I’m not new to Python but to Blender scripting, and could not figure out how to have each character considered separately.

I think this is not an easy task because the info about character width is just used to set them correctly apart but never exported in any way because the text object is changable. If you convert it into a mesh then they have to be seperated in an automatical way which is more a task for 3D data recontuction software like MeshLab for example. Then the individual bounding boxes can give the width with a little rescaling (0.999 or so) but all height have to be unified for the highest character… For such a fx the individual sizes for a character has to be used and it seems to be easier to give the original text tool in blender this ability… maybe a feature request?

I have an idea that might work, it would take a bit of work…
Use something like FontForge ( it is python scriptable )…and could be called by Blender…as each font has a set bounding box for spacing, etc. either create a bounding box around the fonts which could become your Blocks extrude away, and extrude the font towards or create an empty box font that could be used behind a typed font ( would require typing two times, one for box and one for font)…