mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-10-02 03:00:29 +03:00
Balancing Payload Logistics: PMD, Assorted Changes, and Deconstructor Behavioral Changes (#12182)
* Payload Changes 3 (final) * Deconstructor Behavior Changes Final * Added full-storage icon * adjustments * removed fontello file * Removed full-storage.png * Tweaked itemBuffer * Update IconConverter.java * Apply suggestion from @Anuken --------- Co-authored-by: EggleEgg <125359838+EggleEgg@users.noreply.github.com> Co-authored-by: Anuken <arnukren@gmail.com>
This commit is contained in:
co-authored by
EggleEgg
Anuken
parent
616cc98098
commit
42ce901da2
@@ -12,11 +12,26 @@ public class IconConverter{
|
||||
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).
|
||||
|
||||
//CONVERTING A PNG INTO A SVG
|
||||
1. Add your png to core/assets-raw/icons/
|
||||
2. Run gradle tools:pack. This will add the png to icons.properties
|
||||
3. If you haven't done it already, download inkscape and add in path enviroment variables your inkscape installation so "inkscape --etc" commands can run
|
||||
4. Run gradle tools:icongen. This step will not work if you haven't done step 3
|
||||
5. Locate your icon.svg under core/assets-raw/fontgen/extra/
|
||||
6. Often generated icons cannot be read by fontello correctly ("If image looks not as expected please convert to compound path manually..."), follow the steps in the wiki linked (https://github.com/fontello/fontello/wiki/How-to-use-custom-images#importing-svg-images)
|
||||
|
||||
//ADDING TO FONTS
|
||||
1. Go to Fontello and load the config.json from core/assets-raw/fontgen/config.json
|
||||
2. Drag the SVG in
|
||||
3. Click on your new fontello icon to select it. If selected the icon circle should show a red outline
|
||||
4. Export the config and font file ("Download webfont" button), replace the old config
|
||||
5. Intall FontForge if you havent done it already
|
||||
6. Take the font (.ttf) from the zip, open it in FontForge, and merge it into font.woff (Element -> Merge fonts) inside core/assets/fonts/. You will be prompted whether you want to keep the existing kerning, usually select Yes
|
||||
7. Optionally, go view -> go to (the 0x unicode index, or search by name) to check if the icon has been added
|
||||
8. Go to file -> generate fonts, uncheck font validation, click generate and replace the old font.woff. Saving the sfd file is not necessary
|
||||
9. Repeat steps 6 and 8 for icon.ttf
|
||||
10. Done! do note when using icons if they contain any dashes (-) they will be converted into camelcase. So something like foo-bar.svg becomes Icon.fooBar
|
||||
**/
|
||||
|
||||
Log.info("Converting icons...");
|
||||
|
||||
Reference in New Issue
Block a user