Bitmap Font Generator Ubuntu

in Resources
Generator

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 ?

Bitmap font editor

Pixel fonts, also known as screen fonts or bitmap fonts, are fonts consisting of small pixels. Pixel fonts display the texts in simple blocks instead of elaborate curves as most regular fonts do. So the obvious advantage of pixel fonts over regular fonts is that texts using pixel fonts can still look crisp and clear in very small sizes. 'pstoimg foo.ps' Convert the first page of foo.ps to the default bitmap type. 'pstoimg -type png -crop a -trans -interlace foo.ps' Same as above, but force png output and crop all the whitespace around the image and make the color white transparent and generate an interlaced bitmap.

Best Answers

  • Accepted Answer

    It seems there is no import option for textures as 'BitmapFonts'.
    I set them up via gd script.

    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.

  • Accepted Answer

    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.

Answers

  • @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 ?

  • Accepted Answer

    It seems there is no import option for textures as 'BitmapFonts'.
    I set them up via gd script.

    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 September 2018

    @Unnamed said:
    It seems there is no import option for textures as 'BitmapFonts'.
    I set them up via gd script.

    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.

  • Accepted Answer

    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.

I use polybar as my status bar in i3 and it's been going great for months now. However, I was recently grepping through the syslog trying to figure out why a browser crash happened and the log was filled with polybar spam that looked like this: polybar|warn: Dropping unmatched character. So I started picking at solving the warning.

Bitmap Font Generator Ubuntu

Turns out there's a Github issue that contains the solution which is to enable bitmap fonts which I'll paste here for posterity:

Bitmap Font Editor

Bitmap Font Generator Ubuntu

Online Bitmap Font Generator

Apparently Ubuntu disables bitmap fonts by default but polybar uses bitmap fonts for icon rendering. I also needed to install the sijj icon font family which was painless.

Emoji Copy And Paste

Have a comment? Send an email to my public inbox. Please follow proper mail etiquette.