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

There is no way to import BitmapFont in Godot 3 #10184

Closed
TeddyDD opened this issue Aug 8, 2017 · 15 comments
Closed

There is no way to import BitmapFont in Godot 3 #10184

TeddyDD opened this issue Aug 8, 2017 · 15 comments
Milestone

Comments

@TeddyDD
Copy link

TeddyDD commented Aug 8, 2017

Operating system or device - Godot version:
Godot 3 form master, commit df573f5

Issue description:
While BitmapFont resource exist, there is no way to import TTF as BitmapFont

There is one more use case I'd like to mention: importing image as BitmapFont.
You can find a lot of bitmap fonts in form of textures in the internet.
It could be nice to have way to import them. It's also easier to draw pixel font for your game than create vector ttf file.

From what I see in the BitmapFont API, it could be done as plugin.

Example bitmap fonts from Playscii project:
image:
pico8
and character set definition:
pico8.txt

@reduz
Copy link
Member

reduz commented Aug 8, 2017 via email

@TeddyDD
Copy link
Author

TeddyDD commented Aug 8, 2017

Good to know. Personally I use DynamicFonts but that use case with png -> font seems nice especially for writing rouge-likes ;)
edit: missclick, sorry

@TeddyDD TeddyDD closed this as completed Aug 8, 2017
@TeddyDD TeddyDD reopened this Aug 8, 2017
@ghost
Copy link

ghost commented Sep 11, 2017

I'm using the font Orbitron https://fonts.google.com/specimen/Orbitron

and bitmap is ideal for it, however, dynamic works fine but not as "crispier" if you will

would really love to see bitmap font support make a comeback in 3.0!

@akien-mga akien-mga added this to the 3.0 milestone Sep 19, 2017
@Zylann
Copy link
Contributor

Zylann commented Sep 22, 2017

It's also the only way to change the script editor font, and I don't know how to make one at the moment^^"
An issue was open about it though #10866

@reduz
Copy link
Member

reduz commented Nov 6, 2017

The old bitmap font importer will not come back due to it being really complex and hacky.
I suggest implementing BMFont support (Godot can parse thos files, there are methods for that in BitmapFont):

https://github.com/godotengine/godot/blob/master/scene/resources/font.h#L122

either as a resource type or importer (resource type may make more sense).

@mrcdk
Copy link
Contributor

mrcdk commented Nov 6, 2017

Doesn't this PR #12619 fix this?

@ghost
Copy link

ghost commented Nov 6, 2017

It seems like we can use 2.xx and import the bitmapfont, then change its filename to .font and use it in 3.0. I saw a facebook post of someone mentioning this, however, I imagine this might cause problems in the future? If not, I mean I guess we should be fine for now

@mhilbrunner
Copy link
Member

Should #12619 be re-opened/merged? Seems it is the most feasible way currently.

@reduz
Copy link
Member

reduz commented Jan 16, 2018

I will kick this to 3.1, I think bitmap fonts are still of limited use and BMFont support partly covers this.

@reduz reduz modified the milestones: 3.0, 3.1 Jan 16, 2018
@akien-mga
Copy link
Member

But there is no BMFont support, is there?

@reduz
Copy link
Member

reduz commented Jan 16, 2018

yes, there is

@akien-mga
Copy link
Member

How? I have a .fnt file in my project, it's not shown in the file system dock and I can't use it as font resource.

@mrcdk
Copy link
Contributor

mrcdk commented Jan 16, 2018

It somewhat there, you need to create a BitmapFont and then via code:

$Label.get_font("font").create_from_fnt(fnt_path)

https://i.imgur.com/On5vY83.png

@mrcdk
Copy link
Contributor

mrcdk commented Jan 19, 2018

This is now working since 4de84f4

@reduz
Copy link
Member

reduz commented Jan 19, 2018

great, closing then

@reduz reduz closed this as completed Jan 19, 2018
@akien-mga akien-mga modified the milestones: 3.1, 3.0 Jan 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants