Title says it all. I need some Ubuntu or Windows compatible tool capable of generating bitmap font out of texture. Do someone knows about anything ?
What tools are you using to create bitmap fonts usable by GoDot ?
@danul77 said: https://alternativeto.net/software/bmfont/ I tried Bitmap Font Generator before (crossover cost some money but it will pay off). Unfortunately, I can't find how to import colored textures as letters. Do you know how to import colored textures as letters ? Please ?
It seems there is no import option for textures as 'BitmapFonts'. I set them up via gd script.
var font = BitmapFont.new()
font.add_texture(texture)
font.set_height(9)
font.add_char(KEY_A,0,Rect2(Vector2( 1, 1),Vector2(7,9)))
...
ResourceSaver.save("res://fonts/font.tres",font)
You can use 'add_char' to add characters. The first argument is the ID of the texture, the second argument is a 'Rect2' with the position and size of the letter in the texture. If the characters are aligned in a grid in the texture file you can use a for loop (KEY_A+1 = KEY_B and so on). KEY_A+32 is the capital A.
- Edited
@Unnamed said: It seems there is no import option for textures as 'BitmapFonts'. I set them up via gd script.
var font = BitmapFont.new() font.add_texture(texture) font.set_height(9) font.add_char(KEY_A,0,Rect2(Vector2( 1, 1),Vector2(7,9))) ... ResourceSaver.save("res://fonts/font.tres",font)
You can use 'add_char' to add characters. The first argument is the ID of the texture, the second argument is a 'Rect2' with the position and size of the letter in the texture. If the characters are aligned in a grid in the texture file you can use a for loop (KEY_A+1 = KEY_B and so on). KEY_A+32 is the capital A.
I was thinking about it, It does not look hard to create importer as plugin or script. Do you know any good tutorial like "Introduction to tool scripts" ? I'm especially interested in drawing own inspector.
I only know this: docs.godotengine.org/en/3.0/tutorials/plugins/editor/making_plugins.html#a-custom-dock. Well, I never read tutorials. I prefer to read the docs and the source code and figure out the rest by myself. Doesn't seem to be hard. You just need a scene, a tool script and a plugin.cfg file.