-
Notifications
You must be signed in to change notification settings - Fork 6
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
Incremental packing? #6
Comments
It's somewhat hard and not often used, I doubt it will be implemented, but I'd still wait for the repo's creator word. |
I won't have time to implement something like this, but I always accept pull requests ! Sent from my iPhone
|
This feature should be quite useful for Asian countries like China, Korea, Japan, etc, which have strong mobile game marketing. Please see this libgdx issue request: I would like to try to implement it, while could you pls give any hints where to start from? Thanks!! |
Hmm a simple solution would be to parse FNT files and a texture into individual rectangles, then re-pack them into another PixmapPacker. Ideally the feature should be accessible through code. Maybe it could also be added in the GUI in a file menu. Good luck ! Let me know if you run into issues. Sent from my iPhone
|
Hi mattdesl, My scenario is having the TTF file as input, so only could use generateFont or generateData of FreeTypeFontGenerator class: public FreeTypeBitmapFontData generateData (int size, String characters, boolean flip, PixmapPacker packer) public BitmapFont generateFont (int size, String characters, boolean flip) So how could I parse FNT files and its texture? I am stucked on this problem and need your further help. Thanks. |
These rely on PixmapPacker. You need to call generateFont with only the new glyphs you need to pack, and not destroy the packer object. There is a demo of custom packing in the LibGDX test bed. Either way it's going to be an expensive process to do it every key type, since it involves rendering from FreeType to a Pixmap, then packing the new font, then uploading the texture to the GPU. Also, since you are looking to do this on the fly as the user types, it wouldn't really be useful to add to my offline GUI tool. Sent from my iPhone
|
Hi,
If I have already packed some fonts, and now would like to add some other characters to this existing pack file incrementally, how to do? Thanks.
The text was updated successfully, but these errors were encountered: