Is it possible to use Gdx freetype for a libGDX game?


#1

Hello!

I’m the maker of 1010! Klooni and I was wondering if it would be possible to use Gdx freetype instead embedding a lot of different bitmap fonts into my Git repository, which is not only a cumbersome process to generate them, but also harder to maintain because the process is manual.

The source code for the mentioned extension can be found here:

Perhaps it was already built when building libGDX itself, but I wanted to be on the safe side. Thank you!


#2

if it would be possible to use Gdx freetype instead embedding a lot of different bitmap fonts

As long as you dont put binary/jar files in your source, it should be
okay. It’s a gradle build, so it should be easy to wire it up within your
main project, alternativeley, it’s in mavenCentral:

https://search.maven.org/#search|ga|1|freetype

There is even a documentations ectiona bout this:


#3

Thanks for the quick feedback, but currently it pumped up the application size from 3.39MB to 5.80MB, without adding the .ttf files themselves, an increase of 2.40MB.

It’s good to know I can do so, and perhaps I will in the future, but for now I will keep the bitmap fonts. Thanks for the quick answer and I hope this can be helpful to anyone else reading :stuck_out_tongue: