diff --git a/core/assets-raw/fontgen/config.json b/core/assets-raw/fontgen/config.json index 0a31462a8d..dffb86e36f 100644 --- a/core/assets-raw/fontgen/config.json +++ b/core/assets-raw/fontgen/config.json @@ -1055,6 +1055,20 @@ "search": [ "defense" ] + }, + { + "uid": "99aa5c8f6bbe4d96a3f422a60ff065a9", + "css": "planet", + "code": 59443, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M343.8 0L312.5 31.3 281.3 62.5 218.8 62.5 187.5 93.8 156.3 125 125 156.3 93.8 187.5 62.5 218.8 62.5 281.3 31.3 312.5 0 343.8 0 406.3 0 468.8 0 531.3 0 593.8 0 656.3 31.3 687.5 62.5 718.8 62.5 781.3 93.8 812.5 125 843.8 156.3 875 187.5 906.3 218.8 937.5 281.3 937.5 312.5 968.8 343.8 1000 406.3 1000 468.8 1000 531.3 1000 593.8 1000 656.3 1000 687.5 968.8 718.8 937.5 781.3 937.5 812.5 906.3 843.8 875 875 843.8 906.3 812.5 937.5 781.3 937.5 718.8 968.8 687.5 1000 656.3 1000 593.8 1000 531.3 1000 468.8 1000 406.3 1000 343.8 968.8 312.5 937.5 281.3 937.5 218.8 906.3 187.5 875 156.3 843.8 125 812.5 93.8 781.3 62.5 718.8 62.5 687.5 31.3 656.3 0 593.8 0 531.3 0 468.8 0 406.3 0 343.8 0ZM406.3 62.5L437.5 93.8 468.8 125 531.3 125 562.5 156.3 562.5 218.8 593.8 250 625 281.3 656.3 312.5 687.5 343.8 718.8 375 781.3 375 843.8 375 906.3 375 937.5 406.3 937.5 468.8 937.5 531.3 937.5 593.8 906.3 625 875 656.3 875 718.8 843.8 750 812.5 781.3 781.3 812.5 750 843.8 718.8 875 656.3 875 625 906.3 593.8 937.5 531.3 937.5 500 906.3 468.8 875 437.5 843.8 437.5 781.3 468.8 750 500 718.8 531.3 687.5 562.5 656.3 562.5 593.8 562.5 531.3 531.3 500 500 468.8 468.8 437.5 406.3 437.5 343.8 437.5 281.3 437.5 250 468.8 218.8 500 187.5 531.3 156.3 562.5 125 593.8 93.8 625 62.5 593.8 62.5 531.3 62.5 468.8 62.5 406.3 93.8 375 125 343.8 125 281.3 156.3 250 187.5 218.8 218.8 187.5 250 156.3 281.3 125 343.8 125 375 93.8 406.3 62.5ZM718.8 562.5L687.5 593.8 687.5 656.3 718.8 687.5 781.3 687.5 812.5 656.3 812.5 593.8 781.3 562.5 718.8 562.5Z", + "width": 1000 + }, + "search": [ + "planet" + ] } ] } \ No newline at end of file diff --git a/core/assets/fonts/font.woff b/core/assets/fonts/font.woff index c031c478de..92cf31f69a 100644 Binary files a/core/assets/fonts/font.woff and b/core/assets/fonts/font.woff differ diff --git a/core/assets/fonts/icon.ttf b/core/assets/fonts/icon.ttf index badd3e3b66..9359cde43a 100644 Binary files a/core/assets/fonts/icon.ttf and b/core/assets/fonts/icon.ttf differ diff --git a/core/src/mindustry/type/Planet.java b/core/src/mindustry/type/Planet.java index 4299382597..fe6acb2560 100644 --- a/core/src/mindustry/type/Planet.java +++ b/core/src/mindustry/type/Planet.java @@ -110,7 +110,7 @@ public class Planet extends UnlockableContent{ /** If true, waves are created on sector loss. TODO remove. */ public boolean allowWaves = false; /** Icon as displayed in the planet selection dialog. This is a string, as drawables are null at load time. */ - public String icon = "commandRally"; + public String icon = "planet"; /** Default core block for launching. */ public Block defaultCore = Blocks.coreShard; /** Sets up rules on game load for any sector on this planet. */ diff --git a/tools/src/mindustry/tools/IconConverter.java b/tools/src/mindustry/tools/IconConverter.java index bb320a4114..3b0c0d7c13 100644 --- a/tools/src/mindustry/tools/IconConverter.java +++ b/tools/src/mindustry/tools/IconConverter.java @@ -10,6 +10,14 @@ public class IconConverter{ float width, height; public static void main(String[] __){ + /* + Process for adding an icon to the font: + 1. Have an SVG ready, possibly created with this tool. + 2. Go to Fontello and load the config.json from core/assets-raw/fontgen/config.json + 3. Drag the SVG in. + 4. Export the config and font file, replace the old config. + 5. Take the font (ttf) from the zip, open it in FontForge, and merge it into font.woff and icon.ttf. Usually, you would do view -> go to (the 0x unicode index). + **/ Log.info("Converting icons..."); Time.mark();