Skip to content

Commit 7f59309

Browse files
committed
improve the logic around default font
1 parent fe19141 commit 7f59309

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

Item Creator/src/main/java/org/broken/arrow/library/itemcreator/meta/map/font/MapFontWrapper.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,9 @@ public boolean isValid(@Nonnull String text) {
248248
* @return A new {@link MapFont} populated with character sprites from this wrapper.
249249
*/
250250
public MapFont getMapFont() {
251-
if (chars.isEmpty())
252-
return MinecraftFont.Font;
251+
if (chars.isEmpty()) {
252+
return new MinecraftFont();
253+
}
253254
MapFont mapFont = new MapFont();
254255
chars.forEach((character, characterSprite) -> mapFont.setChar(character, characterSprite.getCharacterSprite()));
255256
return mapFont;

Item Creator/src/main/java/org/broken/arrow/library/itemcreator/meta/map/pixel/TextOverlay.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ public void setMapFont(final char ch, @Nonnull final CharacterSprite sprite) {
5959
* @param font the {@link Font} representing the custom character sprite.
6060
*/
6161
public void setMapFont(final char[] chars, @Nonnull final Font font) {
62-
BufferedImage workImg = new BufferedImage(32, 32, BufferedImage.TYPE_INT_ARGB);
63-
Graphics2D g = workImg.createGraphics();
64-
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
6562
for (char charter : chars) {
6663
mapFontWrapper.setChar(charter, font);
6764
}

0 commit comments

Comments
 (0)