diff --git a/assets/font.png b/assets/font.png deleted file mode 100644 index 32d4b42f8..000000000 Binary files a/assets/font.png and /dev/null differ diff --git a/assets/font1x.png b/assets/font1x.png new file mode 100644 index 000000000..4b643360e Binary files /dev/null and b/assets/font1x.png differ diff --git a/assets/font2x.png b/assets/font2x.png new file mode 100644 index 000000000..1a1e62d74 Binary files /dev/null and b/assets/font2x.png differ diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/Assets.java b/src/com/shatteredpixel/shatteredpixeldungeon/Assets.java index 678dd2c2f..ff6fde5f7 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/Assets.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/Assets.java @@ -111,7 +111,8 @@ public class Assets { public static final String SPELL_ICONS = "spell_icons.png"; public static final String PIXELFONT = "pixel_font.png"; - public static final String FONT = "font.png"; + public static final String FONT1X = "font1x.png"; + public static final String FONT2X = "font2x.png"; public static final String THEME = "theme.mp3"; public static final String TUNE = "game.mp3"; diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/PixelScene.java b/src/com/shatteredpixel/shatteredpixeldungeon/scenes/PixelScene.java index 703f904b3..d5d2d4d4a 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/PixelScene.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/scenes/PixelScene.java @@ -57,9 +57,11 @@ public class PixelScene extends Scene { public static Camera uiCamera; + //stylized pixel font public static BitmapText.Font pixelFont; - public static BitmapText.Font fontLinear; - public static BitmapText.Font fontNearest; + //These represent various mipmaps of the same font + public static BitmapText.Font font1x; + public static BitmapText.Font font2x; @Override public void create() { @@ -108,13 +110,18 @@ public class PixelScene extends Scene { pixelFont.tracking = -1; // 9x15 (18) - fontLinear = Font.colorMarked( - BitmapCache.get( Assets.FONT), 22, 0x00000000, BitmapText.Font.LATIN_FULL ); - fontNearest = Font.colorMarked( - BitmapCache.get( "2", Assets.FONT), 22, 0x00000000, BitmapText.Font.LATIN_FULL ); - fontLinear.baseLine = fontNearest.baseLine = 17; - fontLinear.tracking = fontNearest.tracking = -2; - fontLinear.texture.filter(Texture.LINEAR, Texture.LINEAR); + font1x = Font.colorMarked( + BitmapCache.get( Assets.FONT1X), 22, 0x00000000, BitmapText.Font.LATIN_FULL ); + font1x.baseLine = 17; + font1x.tracking = -2; + font1x.texture.filter(Texture.LINEAR, Texture.LINEAR); + + //font1x double scaled + font2x = Font.colorMarked( + BitmapCache.get( Assets.FONT2X), 44, 0x00000000, BitmapText.Font.LATIN_FULL ); + font2x.baseLine = 38; + font2x.tracking = -4; + font2x.texture.filter(Texture.LINEAR, Texture.NEAREST); } } @@ -135,14 +142,14 @@ public class PixelScene extends Scene { float pt = size * zoom; - if (pt >= 38){ + if (pt >= 25) { - font = fontNearest; - scale = pt / 19f; + font = font2x; + scale = pt / 38f; } else if (pt >= 12) { - font = fontLinear; + font = font1x; scale = pt / 19f; } else {