To support elecotromeiers DX9Text project, I decided to try and make a tool like BitmapfontBuilder with VVVV, that can save a .png file with alpha, in stead off a 15MB .tga file you need to use photoshop for.
Things are going okay, I fugured, using TextMetrics to figure out the max caracter with in pixels, so I can calculate the font a font size that is as big as possible.
Okay, text metrics isn’t spreadable, that is to bad (and hard, I know for sure) but the weird thing is that the Max Charwidth Pin makes no sense to me.
I want to end up with a 512x512 pixels GDI renderer with 16x16 letters in them (making it the first 256 letters in ASCII).
So the max width should not be bigger than 512:16=32 pixels.
So I fugure out what font size has a max width off 32 pixels.
But most fonts can be bigger than that!! I am a bit puzzled on where the max width pin of the TextMetrics comes from.
I am a bit puzzled on where the max width pin of the TextMetrics comes from.
The TextMetrics Node basically provides information on spacing for a chosen font. The Max Charwidth pin tells you the width of the widest character of the chosen font (depending on the specified font-size). If you had for instance a font which only contains the characters “i” and “w” the node would output the width of “w”.
For your purposes GlyphInfo(String) seems to be the better choice.