-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
improve ktx-assets integration with gdx-freetype #113
Comments
I agree that the loader registration syntax seems overcomplicated, this is exactly the kind of thing that KTX could improve. Not sure if another dependency in
Welcome to LibGDX. |
|
Okay, with that my class looks like this:
Which is certainly an improvement! Some questions I'm left with:
|
Good point, I'll unify the API. As for the initialization code: I guess it depends on your code style and project structure. I try to initialize And be careful with |
@keturn Have you tried using the latest snapshot with the API improvements? I think the module is OK as it is, but I realized that |
I think I'm done with both |
I've created a few mock applications to test this out and it seems to work without issues on desktop, with both OTF/TTF files and |
As someone new to GDX and Kotlin, this one took me a while.
As the libgdx wiki describes, you need to set up FreetypeFontLoader on your AssetManager, since it doesn't register itself as a loader by default.
My transcription of that for ktx-assets looks like:
and then that asset manager may be used like
So I guess the areas of improvement include
load<BitmapFont>
, notload<FreetypeFont>
. Because you're constructing a bitmap font out of this, even though the input is a TTF file.The text was updated successfully, but these errors were encountered: