Skip to content

about use AssetManager load FreeTypeFont #155

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

Open
Rail1bc opened this issue Mar 6, 2025 · 0 comments
Open

about use AssetManager load FreeTypeFont #155

Rail1bc opened this issue Mar 6, 2025 · 0 comments

Comments

@Rail1bc
Copy link

Rail1bc commented Mar 6, 2025

libdgx v:1.12.1
skin-composer ver.58

Using translation software may result in ambiguity, please forgive me
使用翻译软件,可能存在歧义,请见谅

I am learning to try using freetype font placeholders with custom serializers and Asset Manager to load skin.json
Due to some issues regarding relative paths, I have to use Asset Manager
Follow the instructions on the wiki https://github.com/raeleus/skin-composer/wiki/Creating-FreeType-Fonts#using-a-custom-serializer
I tried to use it
我学习尝试使用 freetype字体占位符 配合 自定义序列化程序 与AssetManager,加载skin.json
因为一些关于相对路径的问题,我必须使用 AssetManager
按照wiki的指引 https://github.com/raeleus/skin-composer/wiki/Creating-FreeType-Fonts#using-a-custom-serializer
我尝试使用

AssetManager assetManager = new AssetManager();
assetManager.setLoader(Skin.class, new FreeTypeSkinLoader(assetManager.getFileHandleResolver()));
assetManager.load("skin-name.json", Skin.class);

But the idea report cannot find FreeTypeSkinLoader
I am not sure if FreeTypeSkinLoader has been deprecated in previous versions or if I need to implement a FreeTypeSkinLoader myself
If I need to implement a FreeTypeSkinLoader myself, I lack examples to learn and imitate it
但是idea 报告 找不到 FreeTypeSkinLoader
我不清楚FreeTypeSkinLoader是否已经在曾经的版本弃用,或需要我自己实现一个FreeTypeSkinLoader
如果需要我自己实现一个FreeTypeSkinLoader,我缺乏学习模仿的示例

My libgdx project repository: https://github.com/Rail1bc/cn.tldream.ff
Currently, I am not using a custom serialization program. Instead, I am loading regular skin.json and manually loading the combination of freetypefont and skin
我的libgdx项目仓库:https://github.com/Rail1bc/cn.tldream.ff
当前我没有使用 自定义序列化程序,而是加载普通的skin.json,然后手动加载freetypefont与skin组合

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

No branches or pull requests

1 participant