Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the bitmap font import and usage workflow #4743

Closed
davthedev opened this issue Mar 11, 2021 · 3 comments · Fixed by #5194
Closed

Document the bitmap font import and usage workflow #4743

davthedev opened this issue Mar 11, 2021 · 3 comments · Fixed by #5194

Comments

@davthedev
Copy link

Describe the project you are working on

A 2D game that uses bitmap fonts

Describe the problem or limitation you are having in your project

I have a bitmap font in Angelcode, .fnt file fomat, created using BMFont (https://www.angelcode.com/products/bmfont/) .
I can import this font format without issue in Godot; it is automatically converted into an appropriate BitmapFont resource.

Here is an example for you to try:
bitmap_font_resource_example.zip

To get the file imported, I have to

  • Select a Label node, for example, and target its Custom Font property
  • Click "Load" in the font resource slot submenu. The file chooser appears. The .fnt file does not show up inside the explorer.
  • Set the file type filter to All files
  • Now all file types are visible, I can select my .fnt file

From this point, the bitmap font is correctly imported and can be used. But it is not straightforward to get it done.

My first reflexe was to create a new BitmapFont and add the .fnt file from there, which is not possible. This is confusing. I had to guess the correct procedure with trial and error. No documentation was found either about that possibility, which gives great results for my needs. This deserves to be more visible!

As far as I can remember, there was a way to generate bitmap fonts inside Godot 2. It was removed. Is the feature treated as an easter egg? Seems so! 😄

Describe the feature / enhancement and how it helps to overcome the problem or limitation

  • In the Font resource import dialog, add an option for .fnt files and make them visible by default as recognized file type.
  • Document the bitmap font import process.

Maybe: rework the overall font import UX so that the process is similar for bitmap and dynamic fonts.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

The .fnt file is added as a recognizable type from the Font resource import dialog.

If this enhancement will not be used often, can it be worked around with a few lines of script?

No, it is a UX issue.

Is there a reason why this should be core and not an add-on in the asset library?

Font resources are part of the core.

@Calinou
Copy link
Member

Calinou commented Mar 11, 2021

I moved this to godot-docs as this is about documentation. The part about the .fnt extension loader is already covered in a bug report: godotengine/godot#39771

As far as I can remember, there was a way to generate bitmap fonts inside Godot 2. It was removed. Is the feature treated as an easter egg? Seems so! smile

The bitmap font generation feature was never reimplemented in Godot 3.x because bitmap fonts are generally on the way out. For most games, using DynamicFont is a better idea (and MSDF in 4.0). When using pixel art fonts, you can disable antialiasing in the DynamicFontData resource.

However, nothing prevents a third party from creating a Godot editor add-on to generate bitmap fonts.

@Calinou Calinou transferred this issue from godotengine/godot-proposals Mar 11, 2021
@Calinou Calinou changed the title Make the bitmap font import workflow more visible & document it Document the bitmap font import and usage workflow Mar 11, 2021
@davthedev
Copy link
Author

The bitmap font generation feature was never reimplemented in Godot 3.x because bitmap fonts are generally on the way out. For most games, using DynamicFont is a better idea (and MSDF in 4.0). When using pixel art fonts, you can disable antialiasing in the DynamicFontData resource.

If the font is from a TTF file, disabling the antialiasing is enough, sure!

My case covers pixel fonts that are read from images & descriptor files; not proper TTF font files. Initially I can render a character grid from a TTF font, and this is fine to use an external software for that. Next, I edit the rendered characters in their bitmap form to add gradients, details & colors. Alternately, I can draw my glyphs from scratch, pixel by pixel.
See examples of such fonts there : https://opengameart.org/content/bitmap-font-pack.

Do you mean that deprecation of .fnt file support is on the roadmap?

@Calinou
Copy link
Member

Calinou commented Mar 11, 2021

Do you mean that deprecation of .fnt file support is on the roadmap?

Bitmap fonts will still be supported in 4.0, but we don't intend to reimplement an official bitmap font generator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants