diff --git a/hyperlap2d-common-api b/hyperlap2d-common-api index 04d28291..5ddad9bf 160000 --- a/hyperlap2d-common-api +++ b/hyperlap2d-common-api @@ -1 +1 @@ -Subproject commit 04d282910e70e4b1722f8f07fd32cb0456075896 +Subproject commit 5ddad9bf79f4fe0e350d8d4b189d210c4118a717 diff --git a/hyperlap2d-runtime-libgdx b/hyperlap2d-runtime-libgdx index 7b7b18f5..cda53e82 160000 --- a/hyperlap2d-runtime-libgdx +++ b/hyperlap2d-runtime-libgdx @@ -1 +1 @@ -Subproject commit 7b7b18f5e406023a7b8d409aae275818c4d7e5a1 +Subproject commit cda53e8292598302c077556f69da0dfdab0e5e4e diff --git a/src/main/java/games/rednblack/editor/proxy/ResourceManager.java b/src/main/java/games/rednblack/editor/proxy/ResourceManager.java index d19e2bee..2821f1b0 100644 --- a/src/main/java/games/rednblack/editor/proxy/ResourceManager.java +++ b/src/main/java/games/rednblack/editor/proxy/ResourceManager.java @@ -88,8 +88,18 @@ public void onRegister() { packer.setTransparentColor(Color.WHITE); packer.getTransparentColor().a = 0; - FreeTypeFontGenerator dejaVuSansGenerator = new FreeTypeFontGenerator(Gdx.files.internal("freetypefonts/DejaVuSans.ttf")); - FreeTypeFontGenerator monoGenerator = new FreeTypeFontGenerator(Gdx.files.internal("freetypefonts/FiraCode-Regular.ttf")); + FreeTypeFontGenerator dejaVuSansGenerator = new FreeTypeFontGenerator(Gdx.files.internal("freetypefonts/DejaVuSans.ttf")) { + @Override + protected BitmapFont newBitmapFont(BitmapFont.BitmapFontData data, Array pageRegions, boolean integer) { + return new ThreadSafeBitmapFont(data, pageRegions, integer); + } + }; + FreeTypeFontGenerator monoGenerator = new FreeTypeFontGenerator(Gdx.files.internal("freetypefonts/FiraCode-Regular.ttf")){ + @Override + protected BitmapFont newBitmapFont(BitmapFont.BitmapFontData data, Array pageRegions, boolean integer) { + return new ThreadSafeBitmapFont(data, pageRegions, integer); + } + }; FreeTypeFontGenerator.FreeTypeFontParameter parameter = new FreeTypeFontGenerator.FreeTypeFontParameter(); parameter.characters += "⌘⇧⌥\u25CF\u2022"; @@ -126,7 +136,7 @@ public void onRegister() { dejaVuSansGenerator.dispose(); - TextureRegion dejavuRegion = new TextureRegion(new Texture(Gdx.files.internal("style/default-font-32.png"))); + /*TextureRegion dejavuRegion = new TextureRegion(new Texture(Gdx.files.internal("style/default-font-32.png"))); ShadedDistanceFieldFont smallDistanceField = new ShadedDistanceFieldFont(Gdx.files.internal("style/default-font-32.fnt"), dejavuRegion); smallDistanceField.setDistanceFieldSmoothing(6); smallDistanceField.getData().setScale(0.35f); @@ -135,7 +145,7 @@ public void onRegister() { defaultDistanceField.getData().setScale(0.4f); ShadedDistanceFieldFont bigDistanceField = new ShadedDistanceFieldFont(Gdx.files.internal("style/default-font-32.fnt"), dejavuRegion); bigDistanceField.setDistanceFieldSmoothing(6); - bigDistanceField.getData().setScale(0.5f); + bigDistanceField.getData().setScale(0.5f);*/ /* Create the ObjectMap and add the fonts to it */ ObjectMap fontMap = new ObjectMap<>(); fontMap.put("small-font", small);