9
0
mirror of https://github.com/Xiao-MoMi/Custom-Nameplates.git synced 2025-12-28 19:29:17 +00:00

Update AdvanceManagerImpl.java

This commit is contained in:
XiaoMoMi
2024-10-07 02:44:23 +08:00
parent 2ba7ad95ba
commit 5df341b2a1

View File

@@ -787,6 +787,11 @@ public class AdvanceManagerImpl implements AdvanceManager {
plugin.getPluginLogger().warn(ttf.getAbsolutePath() + " is not a .ttf");
return;
}
if (true) {
plugin.getPluginLogger().info("We're currently unable to obtain TTF advance");
plugin.getPluginLogger().info("If you have Java knowledge and are interested in this, consider contributing if you have any progress.");
return;
}
try (InputStream inputStream = new FileInputStream(ttf)) {
ByteBuffer byteBuffer = null;
FT_Face fT_Face = null;
@@ -883,6 +888,7 @@ public class AdvanceManagerImpl implements AdvanceManager {
// free resources
MemoryUtil.memFree(byteBuffer);
FreeTypeUtils.release();
} catch (IOException e) {
throw new RuntimeException(e);
@@ -1025,7 +1031,6 @@ public class AdvanceManagerImpl implements AdvanceManager {
public void disable() {
this.unload();
this.charFontWidthDataMap.clear();
FreeTypeUtils.release();
}
private void loadTemplates() {